Skip to content

Commit 0579541

Browse files
authored
Update python/tutorials/02-fused-softmax.py
1 parent 971472c commit 0579541

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/tutorials/02-fused-softmax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ def benchmark(M, N, provider):
226226
if provider == 'triton':
227227
ms = triton.testing.do_bench(lambda: softmax(x, y))
228228
gbps = lambda ms: 2 * x.numel() * x.element_size() * 1e-9 / (ms * 1e-3)
229+
torch.xpu.empty_cache()
229230
return gbps(ms)
230231

231232

0 commit comments

Comments
 (0)