@@ -79,7 +79,7 @@ class BenchmarkOperatorBackend:
79
79
80
80
81
81
DEFAULT_WARMUP = 25
82
- DEFAULT_RUN_ITERS = 100
82
+ DEFAULT_REP = 100
83
83
DEFAULT_QUANTILES = [0.5 , 0.1 , 0.9 ]
84
84
REGISTERED_BENCHMARKS : Dict [str , OrderedDict [str , BenchmarkOperatorBackend ]] = {}
85
85
REGISTERED_METRICS : defaultdict [str , List [str ]] = defaultdict (list )
@@ -127,7 +127,7 @@ def __exit__(self, *args, **kwargs):
127
127
self .elapsed_ms = (end_time - self ._start_time ) * 1e3
128
128
129
129
130
- def do_bench_walltime (fn , warmup = 25 , rep = 100 ):
130
+ def do_bench_walltime (fn , warmup = 25 , rep = DEFAULT_REP ):
131
131
fn ()
132
132
torch .cuda .synchronize ()
133
133
@@ -808,7 +808,7 @@ def fwd_no_grad_fn():
808
808
return fwd_no_grad_fn
809
809
810
810
def run (
811
- self , warmup = DEFAULT_WARMUP , rep = DEFAULT_RUN_ITERS , quantiles = DEFAULT_QUANTILES
811
+ self , warmup = DEFAULT_WARMUP , rep = DEFAULT_REP , quantiles = DEFAULT_QUANTILES
812
812
) -> None :
813
813
"""Benchmarking the operator and returning its metrics."""
814
814
metrics = []
@@ -1183,7 +1183,7 @@ def _do_bench(
1183
1183
input_id : int ,
1184
1184
fn_name : str ,
1185
1185
warmup = DEFAULT_WARMUP ,
1186
- rep = DEFAULT_RUN_ITERS ,
1186
+ rep = DEFAULT_REP ,
1187
1187
quantiles = DEFAULT_QUANTILES ,
1188
1188
baseline : bool = False ,
1189
1189
) -> BenchmarkOperatorMetrics :
0 commit comments