Short name describing what triggered the graph break
autograd.grad consumed returned tensor’s grad_fn
Values or code snippet captured at the break point
Leaked output tensors: {leaked_str}
Explanation of why the graph break was triggered
torch.autograd.grad() consumes grad_fns that are needed by tensors returned from this compiled function. This would cause ‘backward through graph a second time’ errors. The following returned tensors have consumed grad_fns: {leaked_str}
Hints on how to resolve the graph break
{leaked[0]}.detach()