mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dynamo] Convert invalid args into graph breaks (#121784)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121784 Approved by: https://github.com/yanboliang ghstack dependencies: #121615, #121616
This commit is contained in:
committed by
PyTorch MergeBot
parent
5b90074540
commit
0df39480f6
@ -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:
|
||||
|
Reference in New Issue
Block a user