Skip to content

Commit

Permalink
Merge branch 'ershi/tile-benchmark-gemm-exception' into 'main'
Browse files Browse the repository at this point in the history
Improve error reporting in GEMM benchmark

See merge request omniverse/warp!1095
  • Loading branch information
shi-eric committed Feb 18, 2025
2 parents 1b49bdf + 4088b47 commit 218a64c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion warp/examples/benchmarks/benchmark_gemm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ def benchmark_warp(A: wp.array, B: wp.array, config: List[int], warm_up: int, it

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

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

0 comments on commit 218a64c

Please sign in to comment.