Short name describing what triggered the graph break
torch.map: f mutates a captured tensor
Values or code snippet captured at the break point
freevars={freevars_mutated}
Explanation of why the graph break was triggered
map only supports in-place mutation of xs. A tensor captured from the enclosing scope (lifted parameter) is loop-invariant: every iteration sees the same tensor, so a mutation makes iterations depend on each other, breaking map’s independence contract and introducing a data race under any parallel lowering. Pass the buffer through xs, or use scan / while_loop if sequential buffer updates are required.
Hints on how to resolve the graph break
torch.compile call, or by using torch.compiler.set_stance("force_eager").