[TUTORIALS] Skip running TMA tutorials on non-hopper architectures (#2153)

This commit is contained in:
Keren Zhou
2023-08-22 21:02:26 -04:00
committed by GitHub
parent 5fa1fa1b27
commit 6a65c894fe
2 changed files with 10 additions and 0 deletions

View File

@@ -191,5 +191,10 @@ def benchmark(M, N, K, TRANS_A, TRANS_B, provider):
return perf(ms), perf(max_ms), perf(min_ms)
if torch.cuda.get_device_capability()[0] < 9:
import sys
print("Skipping TMA benchmark for GPU with compute capability < 9")
sys.exit(0)
test_matmul()
benchmark.run(show_plots=False, print_data=True)

View File

@@ -171,4 +171,9 @@ def benchmark(M, N, K, provider):
return perf(ms), perf(max_ms), perf(min_ms)
if torch.cuda.get_device_capability()[0] < 9:
import sys
print("Skipping TMA benchmark for GPU with compute capability < 9")
sys.exit(0)
benchmark.run(show_plots=False, print_data=True)