Skip to content

Commit d235a15

Browse files
committed
Patch get_args_with_constexprs
1 parent 83e3be0 commit d235a15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torch/_inductor/runtime/triton_heuristics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ def _get_args_with_constexprs(self, args, launcher):
605605
# so we can sort them by index.
606606
constexpr_args: list[tuple[int, Any]] = []
607607
for arg_name, arg_val in launcher.config.kwargs.items():
608-
constexpr_args.append((self.fn.arg_names.index(arg_name), arg_val))
608+
if arg_name in self.fn.arg_names:
609+
constexpr_args.append((self.fn.arg_names.index(arg_name), arg_val))
609610

610611
constexpr_args.sort()
611612
new_args = [*args]

0 commit comments

Comments
 (0)