You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixespytorch#150477
### Summary:
- Added frame information (function name, file, line number) to all graph break/skip messages
- Standardized message format: "torch.compile will skip tracing the frame <name> (<file> line <N>) and fall back to eager. Reason: <reason>"
### Impacts:
module: dynamo
Pull Request resolved: pytorch#167067
Approved by: https://github.com/williamwen42
Graph break in user code at test_error_messages.py:N
1742
+
Graph Break Reason: Encountered graph break that we cannot resume from. Compiling up to the previous resumable state, then skipping the rest of the function. Graph break encountered:
1743
+
Graph break under GenericContextWrappingVariable
1744
+
Explanation: Attempted to graph break in an active context manager(s) that doesn't support graph breaking.
1745
+
Hint: Move the offending context manager(s) to outside the compiled region.
1746
+
Hint: This graph break may have been caused by an earlier graph break. Resolving the earlier graph break may resolve this one.
1747
+
1748
+
Developer debug context: Active generic context managers: [GenericContextWrappingVariable(GenericCtxMgr)]
1749
+
1750
+
For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0066.html
1751
+
User code traceback:
1752
+
File "test_error_messages.py", line N, in test_skipped_frame_with_verbose_traceback_nested
Graph break in user code at test_error_messages.py:N
1793
+
Graph Break Reason: Encountered graph break that we cannot resume from. Compiling up to the previous resumable state, then skipping the rest of the function. Graph break encountered:
1794
+
Data-dependent branching
1795
+
Explanation: Detected data-dependent branching (e.g. `if my_tensor.sum() > 0:`). Dynamo does not support tracing dynamic control flow.
1796
+
Hint: This graph break is fundamental - it is unlikely that Dynamo will ever be able to trace through your code. Consider finding a workaround.
1797
+
Hint: Use `torch.cond` to express dynamic control flow.
1798
+
1799
+
Developer debug context: attempted to jump with TensorVariable()
1800
+
1801
+
For more details about this graph break, please visit: https://meta-pytorch.github.io/compile-graph-break-site/gb/gb0170.html
1802
+
User code traceback:
1803
+
File "test_error_messages.py", line N, in test_skip_frame_in_loop_message_nested
1804
+
result = torch.compile(f3, backend="eager")(torch.randn(3)) # noqa: F841
0 commit comments