GB7324
Graph-Break Type
Short name describing what triggered the graph break
returning intermediate with requires_grad_()
Context
Values or code snippet captured at the break point
graph output depends on source-less requires_grad_()
Explanation
Explanation of why the graph break was triggered
msg
Hints
Hints on how to resolve the graph break
- If you only need the tensor values without gradients,
- call .detach() before returning.
- Consume the gradient inside the compiled function
- (call backward() and use .grad),
- or move requires_grad_() outside torch.compile.
Click here to add Additional Info
Back to Registry