Skip to content

Commit fef155a

Browse files
committed
fix typo
Signed-off-by: Enwei Zhu <21126786+syuoni@users.noreply.github.com>
1 parent 97d148d commit fef155a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tensorrt_llm/_torch/autotuner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def choose_one(
730730
# Log the cache miss. Expect no cache miss in inference.
731731
if not is_cache_hit:
732732
logger.warning_once(
733-
f"[AutoTunner] {custom_op} using the fallback tactic, due to cache miss on input shapes={input_shapes}",
733+
f"[AutoTuner] {custom_op} using the fallback tactic, due to cache miss on input shapes={input_shapes}",
734734
key=(custom_op, "warning_autotuning_cache_miss_fallback"))
735735

736736
return (best_runner, best_tactic)

tests/unittest/_torch/misc/test_autotuner.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ def forward(self,
112112
mutates_args=())
113113
def 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

Comments
 (0)