GB5748

Graph-Break Type

Short name describing what triggered the graph break

autograd.grad with external GradientEdge

Context

Values or code snippet captured at the break point

context

Explanation

Explanation of why the graph break was triggered

torch.autograd.grad() cannot be used with GradientEdge inputs passed from outside the compiled region. The GradientEdge contains a reference to an autograd node that was created before torch.compile started tracing, so Dynamo cannot trace through its computation.

Hints

Hints on how to resolve the graph break

Additional Information

Click here to add Additional Info

Back to Registry