Skip to content

Commit

Permalink
Add config toggle suggestions for data-dependent/dynamic output shape…
Browse files Browse the repository at this point in the history
… (#114337)

Summary:
Fixes pytorch/pytorch#114220

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

X-link: pytorch/pytorch#114337
Approved by: https://github.com/aakhundov

Reviewed By: osalpekar

Differential Revision: D52584008

Pulled By: ezyang

fbshipit-source-id: f6a34d934a74ba41728e4a254843470340c13f02
  • Loading branch information
ezyang authored and facebook-github-bot committed Jan 9, 2024
1 parent 9a15990 commit 3296220
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1555,11 +1555,17 @@ def get_fake_value(node, tx, allow_non_graph_fake=False):
if isinstance(
cause, torch._subclasses.fake_tensor.DataDependentOutputException
):
unimplemented(f"data dependent operator: {cause.func}")
unimplemented(
f"data dependent operator: {cause.func}; "
"to enable, set torch._dynamo.config.capture_scalar_outputs = True"
)
elif isinstance(
cause, torch._subclasses.fake_tensor.DynamicOutputShapeException
):
unimplemented(f"dynamic shape operator: {cause.func}")
unimplemented(
f"dynamic shape operator: {cause.func}; "
"to enable, set torch._dynamo.config.capture_dynamic_output_shape_ops = True"
)
elif isinstance(
cause, torch._subclasses.fake_tensor.UnsupportedOperatorException
):
Expand Down

0 comments on commit 3296220

Please sign in to comment.