Short name describing what triggered the graph break
torch.scan: combine_fn mutates init or xs
Values or code snippet captured at the break point
init={init_part}, xs={xs_part}
Explanation of why the graph break was triggered
scan only supports in-place mutation of additional_inputs (loop-invariant tensors). init is the initial carry only – from step 1 on the driver feeds combine_fn’s returned carry, so an in-place write to init would only affect step 0. xs[t] is a fresh, storage-disjoint slice each step, so a mutation cannot be observed by step t+1. Update the carry via the combine_fn return value; for in-place lifted buffers use additional_inputs.
Hints on how to resolve the graph break
torch.compile call, or by using torch.compiler.set_stance("force_eager").