GB0034
Graph-Break Type
Short name describing what triggered the graph break
Data-dependent assertion failed (cannot compile partial graph)
Context
Values or code snippet captured at the break point
value: {value}
Explanation
Explanation of why the graph break was triggered
Dynamo has determined when encountering a data-dependent assert failure that it should not compile the partial graph.
Hints
Hints on how to resolve the graph break
- Use
torch._assert()
to raise a hard AssertionError when the check fails.
- This error will propagate back the user code
- that called the compiled function (i.e. Dynamo will not trace any exception handling).
- Remove the assert statement.
- Move the assert statement outside of any context managers in order to graph break with
- partial graph compilation (if fullgraph=False).
- This graph break is fundamental - it is unlikely that Dynamo will ever be able to trace through your code. Consider finding a workaround.
Back to Registry