Skip to content

Commit 5878f0d

Browse files
committed
Don't use implicitly 'elapsed_time' in autotuner
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 571b5b8 commit 5878f0d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

benchmarks/triton_kernels_benchmark/benchmark_testing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import itertools
33
import os
44
from typing import Any, Dict, List
5+
import triton
56

67
USE_IPEX_OPTION = os.getenv("USE_IPEX", "1") == "1"
78
if USE_IPEX_OPTION:
@@ -236,6 +237,8 @@ def do_bench_upstream_pytorch_profiler(fn, n_warmup=25, n_repeat=100, grad_to_no
236237
else:
237238
raise NotImplementedError(f"BENCHMARKING_METHOD: {BENCHMARKING_METHOD} isn't implemented")
238239

240+
triton.testing.do_bench = do_bench
241+
239242

240243
def assert_close(x, y, atol=None, rtol=None, err_msg=""):
241244
import numpy as np

python/triton/runtime/autotuner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def _post_hook(kwargs, exception):
117117
import triton.testing
118118
self.do_bench = lambda kernel_call, quantiles: triton.testing.do_bench(
119119
kernel_call,
120-
warmup=warmup if warmup is not None else 25,
121-
rep=rep if rep is not None else 100,
120+
warmup=warmup if warmup is not None else 10,
121+
rep=rep if rep is not None else 10,
122122
quantiles=quantiles,
123123
)
124124
return

0 commit comments

Comments
 (0)