Skip to content

Commit 4088b47

Browse files
committed
Improve error reporting in GEMM benchmark
1 parent 1b49bdf commit 4088b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

warp/examples/benchmarks/benchmark_gemm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def benchmark_warp(A: wp.array, B: wp.array, config: List[int], warm_up: int, it
9595

9696
# check output
9797
if warm_up > 0:
98-
assert np.allclose(output.numpy(), A.numpy() @ B.numpy(), atol=1e-3, rtol=1e-3)
98+
try:
99+
np.testing.assert_allclose(output.numpy(), A.numpy() @ B.numpy(), atol=1e-3, rtol=1e-3)
100+
except AssertionError as e:
101+
print(f"Failed with {TILE_M=}, {TILE_N=}, {TILE_K=}, {BLOCK_DIM=}")
102+
raise e
99103

100104
# benchmark
101105
with wp.ScopedTimer("warp", print=False, synchronize=True, cuda_filter=wp.TIMING_KERNEL) as timer:

0 commit comments

Comments
 (0)