GB0003
Graph-Break Type
Short name describing what triggered the graph break
Attempt to trace generator
Context
Values or code snippet captured at the break point
Explanation
Explanation of why the graph break was triggered
Generators cannot be compiled directly with torch.compile
.
Hints
Hints on how to resolve the graph break
- Call a generator from inside of a non-generator Python function and
- compile that function instead.
- 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