Skip to content

Commit 37a3402

Browse files
mlazospytorchmergebot
authored andcommitted
[Pattern Matcher] improve error msg (pytorch#161423)
Updates pattern matcher error message Pull Request resolved: pytorch#161423 Approved by: https://github.com/mengluy0125, https://github.com/masnesral
1 parent 763053d commit 37a3402

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torch/_inductor/pattern_matcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,9 @@ def replace(
13061306
for user in old_uses:
13071307
idx = maybe_getitem(user)
13081308
if idx is None:
1309-
raise AssertionError("can't handle")
1309+
raise AssertionError(
1310+
"Deleted index from getitem, did you erase the index and not properly replace it?"
1311+
)
13101312
replace(user, new[idx])
13111313
graph.erase_node(old)
13121314

0 commit comments

Comments
 (0)