Skip to content

Commit

Permalink
Don't suppress original error message for data-dependent value (#111596)
Browse files Browse the repository at this point in the history
Summary:
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

X-link: pytorch/pytorch#111596
Approved by: https://github.com/suo

Reviewed By: izaitsevfb, jeanschmidt

Differential Revision: D50543638

Pulled By: ezyang

fbshipit-source-id: ab0732906e5892eac6e67cbb0fedd6ba1bc567d9
  • Loading branch information
ezyang authored and facebook-github-bot committed Oct 23, 2023
1 parent ea31e72 commit 5a391f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,9 +1428,9 @@ def visit(n: torch.fx.Node):
raise UserError( # noqa: TRY200
UserErrorType.CONSTRAINT_VIOLATION,
"Tried to use data-dependent value in the subsequent computation. "
"This can happen when we encounter unbounded dynamic value that is unknown during tracing time."
"This can happen when we encounter unbounded dynamic value that is unknown during tracing time. "
"You will need to explicitly give hint to the compiler. Please take a look at "
"constrain_as_value OR constrain_as_size APIs",
f"constrain_as_value OR constrain_as_size APIs. {cause}",
case_name="constrain_as_size_example",
)
elif isinstance(cause, torch.utils._sympy.value_ranges.ValueRangeError):
Expand Down

0 comments on commit 5a391f5

Please sign in to comment.