@@ -79,7 +79,7 @@ class BenchmarkOperatorBackend:
7979
8080
8181DEFAULT_WARMUP = 25
82- DEFAULT_RUN_ITERS = 100
82+ DEFAULT_REP = 100
8383DEFAULT_QUANTILES = [0.5 , 0.1 , 0.9 ]
8484REGISTERED_BENCHMARKS : Dict [str , OrderedDict [str , BenchmarkOperatorBackend ]] = {}
8585REGISTERED_METRICS : defaultdict [str , List [str ]] = defaultdict (list )
@@ -127,7 +127,7 @@ def __exit__(self, *args, **kwargs):
127127 self .elapsed_ms = (end_time - self ._start_time ) * 1e3
128128
129129
130- def do_bench_walltime (fn , warmup = 25 , rep = 100 ):
130+ def do_bench_walltime (fn , warmup = 25 , rep = DEFAULT_REP ):
131131 fn ()
132132 torch .cuda .synchronize ()
133133
@@ -808,7 +808,7 @@ def fwd_no_grad_fn():
808808 return fwd_no_grad_fn
809809
810810 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
812812 ) -> None :
813813 """Benchmarking the operator and returning its metrics."""
814814 metrics = []
@@ -1183,7 +1183,7 @@ def _do_bench(
11831183 input_id : int ,
11841184 fn_name : str ,
11851185 warmup = DEFAULT_WARMUP ,
1186- rep = DEFAULT_RUN_ITERS ,
1186+ rep = DEFAULT_REP ,
11871187 quantiles = DEFAULT_QUANTILES ,
11881188 baseline : bool = False ,
11891189 ) -> BenchmarkOperatorMetrics :
0 commit comments