Short name describing what triggered the graph break
torch.map: f mutates pos_args
Values or code snippet captured at the break point
pos_args={pos_args_mutated}
Explanation of why the graph break was triggered
map only supports in-place mutation of xs (each iteration sees a storage-disjoint slice). pos_args are 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. Use scan or 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").