Skip to content

Commit

Permalink
Convert invalid args into graph breaks (#121784)
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/pytorch#121784
Approved by: https://github.com/yanboliang

Reviewed By: jeanschmidt

Differential Revision: D54970023

Pulled By: jansel

fbshipit-source-id: 79c188aeb2a86189b45a6c56de31ac9d9bd6a318
  • Loading branch information
jansel authored and facebook-github-bot committed Mar 18, 2024
1 parent a762495 commit 5a6d0dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,9 @@ def get_fake_value(node, tx, allow_non_graph_fake=False):
)
elif isinstance(cause, ValueRangeError):
raise UserError(UserErrorType.CONSTRAINT_VIOLATION, e.args[0]) from e
elif isinstance(cause, TypeError) and "argument" in str(cause):
unimplemented(f"TypeError {node.target}: {cause}")

raise TorchRuntimeError(str(e)).with_traceback(e.__traceback__) from None

if not allow_non_graph_fake:
Expand Down

0 comments on commit 5a6d0dc

Please sign in to comment.