Skip to content

Commit 78471a1

Browse files
committed
pre-commit
1 parent 877ac53 commit 78471a1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

benchmarks/bench_groupwise_gemm_fp8_blackwell.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def bench_groupwise_gemm_fp8_blackwell(m, n, k, in_dtype, out_dtype):
170170
gemm_fp8_nt_groupwise(a, b, a_scale, b_scale, out=out, scale_major_mode="MN")
171171

172172
measurements = bench_gpu_time(
173-
lambda: gemm_fp8_nt_groupwise(a, b, a_scale, b_scale, out=out, scale_major_mode="MN")
173+
lambda: gemm_fp8_nt_groupwise(
174+
a, b, a_scale, b_scale, out=out, scale_major_mode="MN"
175+
)
174176
)
175177
ms = np.median(measurements)
176178
tflops_per_second = 2 * m * n * k * 1e-9 / ms

benchmarks/bench_tgv_gemm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ def test_tgv_gemm_bf16_sm100_perf():
9999
torch.cuda.synchronize()
100100
end_time = time.time()
101101
cublas_avg_time = (end_time - start_time) / 100
102-
print(f"CUBLAS average time: {cublas_avg_time * 1000:.6f} ms, {flops/cublas_avg_time:.3f} TFLOPS")
102+
print(
103+
f"CUBLAS average time: {cublas_avg_time * 1000:.6f} ms, {flops / cublas_avg_time:.3f} TFLOPS"
104+
)
103105

104106
# Warmup
105107
with autotune(tune_mode=True):
@@ -128,7 +130,7 @@ def test_tgv_gemm_bf16_sm100_perf():
128130

129131
tgv_avg_time = (end_time - start_time) / 100
130132
print(
131-
f"TGV average time: {tgv_avg_time * 1000:.6f} ms, {flops/tgv_avg_time:.3f} TFLOPS, speedup: {cublas_avg_time / tgv_avg_time:.2f}x"
133+
f"TGV average time: {tgv_avg_time * 1000:.6f} ms, {flops / tgv_avg_time:.3f} TFLOPS, speedup: {cublas_avg_time / tgv_avg_time:.2f}x"
132134
)
133135

134136
# Test with PDL
@@ -151,7 +153,7 @@ def test_tgv_gemm_bf16_sm100_perf():
151153

152154
pdl_avg_time = (end_time - start_time) / 100
153155
print(
154-
f"PDL average time: {pdl_avg_time * 1000:.6f} ms, {flops/pdl_avg_time:.3f} TFLOPS, speedup: {cublas_avg_time / pdl_avg_time:.2f}x"
156+
f"PDL average time: {pdl_avg_time * 1000:.6f} ms, {flops / pdl_avg_time:.3f} TFLOPS, speedup: {cublas_avg_time / pdl_avg_time:.2f}x"
155157
)
156158

157159
# Store results for CSV

0 commit comments

Comments
 (0)