GB0372

Graph-Break Type

Short name describing what triggered the graph break

autograd.grad with external grad_fn

Context

Values or code snippet captured at the break point

context

Explanation

Explanation of why the graph break was triggered

torch.autograd.grad() cannot trace through the autograd graph because it’s output depends on a tensor that was created outside the compiled region and has a grad_fn attached. The autograd graph extends beyond the compiled region boundary, which Dynamo cannot trace.

Hints

Hints on how to resolve the graph break

Additional Information

Click here to add Additional Info

Back to Registry