Skip to content

Commit

Permalink
Don't assume compare_arg is fx.Node (pytorch#126771)
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>
Pull Request resolved: pytorch#126771
Approved by: https://github.com/Skylion007
  • Loading branch information
ezyang authored and pytorchmergebot committed May 21, 2024
1 parent fc594ed commit 97eef61
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def _get_existing_inline_assertions(

compare_arg = node.args[0]
if not (
isinstance(compare_arg, torch.fx.Node) and
compare_arg.op == "call_function" and
compare_arg.target in (operator.le, operator.ge) and
len(compare_arg.args) == 2
Expand Down

0 comments on commit 97eef61

Please sign in to comment.