@@ -112,13 +112,13 @@ def forward(self,
112112 mutates_args = ())
113113def get_best_gemm_tactic (x : torch .Tensor , w : torch .Tensor ) -> torch .Tensor :
114114 runners = [GemmRunner ()]
115- tunner = AutoTuner .get ()
115+ tuner = AutoTuner .get ()
116116 tuning_config = TuningConfig (dynamic_tensor_specs = (DynamicTensorSpec (
117117 input_idx = 0 ,
118118 dim_idx = 0 ,
119119 gen_tuning_buckets = get_power_of_2_num_tokens_buckets ,
120120 map_to_tuning_buckets = next_positive_power_of_2 ), ), )
121- runner , tactic = tunner .choose_one (
121+ runner , tactic = tuner .choose_one (
122122 "autotuner_test::get_best_gemm_tactic" ,
123123 runners ,
124124 tuning_config ,
@@ -175,20 +175,20 @@ def forward(self,
175175
176176 x , w = torch .randn (M , 64 ), torch .randn (64 , 128 )
177177 runners = [PartialCrashedRunner ()]
178- tunner = AutoTuner .get ()
178+ tuner = AutoTuner .get ()
179179 tuning_config = TuningConfig (dynamic_tensor_specs = (DynamicTensorSpec (
180180 input_idx = 0 ,
181181 dim_idx = 0 ,
182182 gen_tuning_buckets = get_power_of_2_num_tokens_buckets ,
183183 map_to_tuning_buckets = next_positive_power_of_2 ), ), )
184184 with autotune ():
185- runner , tactic = tunner .choose_one ("test_autotuner_try_block" , runners ,
186- tuning_config , [x , w ])
185+ runner , tactic = tuner .choose_one ("test_autotuner_try_block" , runners ,
186+ tuning_config , [x , w ])
187187
188188 m = M // 2
189189 while m >= 1 :
190- _ , tactic = tunner .choose_one ("test_autotuner_try_block" , runners ,
191- tuning_config , [torch .randn (m , 64 ), w ])
190+ _ , tactic = tuner .choose_one ("test_autotuner_try_block" , runners ,
191+ tuning_config , [torch .randn (m , 64 ), w ])
192192 assert tactic in [
193193 - 1 , 0
194194 ], f"Expect only tactic -1, 0 being chosen, but got tactic { tactic } ."
0 commit comments