Commit ce9c3f02 authored by one's avatar one
Browse files

Format code

parent 0953c1c6
......@@ -38,6 +38,7 @@ class CudaGemmFlopsBenchmarkTest(BenchmarkTestCase, unittest.TestCase):
if dm.device_manager.get_device_compute_capability() not in benchmark._CudaGemmFlopsBenchmark__kernel_map:
assert (ret is False)
assert (benchmark.return_code == ReturnCode.MICROBENCHMARK_UNSUPPORTED_ARCHITECTURE)
return
else:
assert (ret is True)
assert (benchmark.return_code == ReturnCode.SUCCESS)
......
......@@ -100,15 +100,10 @@ def test_gemm_flops_performance_base():
assert (command == expected_command[i])
for i, metric in enumerate(
[
'fp64_m16384_n16384_k16384_flops',
'fp32_m16384_n16384_k16384_flops',
'fp16_m16384_n16384_k16384_flops',
'fp64_tc_m16384_n16384_k16384_flops',
'tf32_tc_m16384_n16384_k16384_flops',
'bf16_tc_m16384_n16384_k16384_flops',
'fp16_tc_m16384_n16384_k16384_flops',
'int8_tc_m16384_n16384_k16384_iops',
'int4_tc_m16384_n16384_k16384_iops'
'fp64_m16384_n16384_k16384_flops', 'fp32_m16384_n16384_k16384_flops', 'fp16_m16384_n16384_k16384_flops',
'fp64_tc_m16384_n16384_k16384_flops', 'tf32_tc_m16384_n16384_k16384_flops',
'bf16_tc_m16384_n16384_k16384_flops', 'fp16_tc_m16384_n16384_k16384_flops',
'int8_tc_m16384_n16384_k16384_iops', 'int4_tc_m16384_n16384_k16384_iops'
]
):
assert (metric in benchmark.result)
......@@ -129,11 +124,7 @@ def test_gemm_flops_performance_base():
command = benchmark._bin_name + benchmark._commands[i].split(benchmark._bin_name)[1]
assert (command == expected_command[i])
for i, metric in enumerate(
[
'fp64_m16384_n16384_k16384_flops',
'fp32_m16384_n16384_k16384_flops',
'fp16_m16384_n16384_k16384_flops'
]
['fp64_m16384_n16384_k16384_flops', 'fp32_m16384_n16384_k16384_flops', 'fp16_m16384_n16384_k16384_flops']
):
assert (metric in benchmark.result)
assert (len(benchmark.result[metric]) == 1)
......@@ -143,8 +134,7 @@ def test_gemm_flops_performance_base():
assert (benchmark.run() is True)
benchmark = FakeGemmFlopsBenchmark(
'fake',
parameters='--precision fp32 --shapes 4096,4096,4096 8192:16384:2,4096,8192'
'fake', parameters='--precision fp32 --shapes 4096,4096,4096 8192:16384:2,4096,8192'
)
assert (benchmark._benchmark_type == BenchmarkType.MICRO)
assert (benchmark.run() is True)
......
......@@ -95,8 +95,7 @@ T,N,7680,8192,8192,1,8416,0,8416,8416,8416,1, 162675, 6336.5
assert (benchmark._process_raw_result(4, 'Invalid raw output') is False)
benchmark = benchmark_class(
benchmark_name,
parameters='--precision fp32_xdlops --shapes 4096,4096,4096 8192:16384:2,4096,8192'
benchmark_name, parameters='--precision fp32_xdlops --shapes 4096,4096,4096 8192:16384:2,4096,8192'
)
assert (benchmark._preprocess() is True)
assert (len(benchmark._commands) == 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment