77 wires and counting

$ follow PyTorch

Keep up with PyTorch in about 3 minutes: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

fair warning: these emails are deeply technical. diffs, version numbers, CVEs, benchmark deltas. if that's not your idea of a good read, this isn't your newsletter.

Folds into your digest — weekly by default, monthly if you prefer. Unsubscribe in one click.

$ status

wire 2026-09-04
stories 117

© 2026 RepoJournal Home Showcase Explore How it works Privacy

$ the-wire · showcase

Inductor fixes stale captured-tensor mutations in while_loop

By RepoJournal · Filed · About PyTorch

PyTorch's Inductor now correctly replays cond_fn mutations of captured tensors in while_loop, fixing silent wrong results in later compiled calls.

Inductor fixed a correctness bug in `torch.while_loop` [1]. Under inference mode, when `cond_fn` mutated a captured tensor that was not a carried input and that tensor was mutated before the loop, the first compiled call returned correct values but left the external tensor stale, and later calls silently produced wrong results. The fix replays these mutations, so external storage stays consistent across calls.

A test fix [2] corrects a grid-size error in `test_graph_partition_user_defined_triton_kernel_reuse` that caused compiled comparisons to check uninitialized memory. The kernel `add_kernel[(4,)](..., n_elements=128, BLOCK_SIZE=16)` launches only 64 Triton programs, leaving elements 64 to 127 unwritten; the test now launches enough programs to cover the full output.

A document fix [3] clarifies the actual requirement for `ROWS_GUARANTEED_SAFE` in the attention kernel: each row needs an unmasked key in the first block scheduled for it, not merely somewhere in the row, because the kernel runs a row maximum starting from `-inf`.

Elsewhere, TorchTitan now routes saves through the `torch_checkpointing` backend [4], which previously built its backend but raised `NotImplementedError` on every operation. Also, TorchTitan removed the in-tree `torch.experiments.forge` module [5]; users importing it from `main` should switch to the standalone TorchForge project.

Action items

References

  1. [1] [inductor] Replay cond_fn mutations of captured tensors in while_loop (#195393) ↗ pytorch/pytorch
  2. [2] [inductor] Fix incorrect grid size in test_graph_partition_user_defined_triton_kernel_reuse (#195546) ↗ pytorch/pytorch
  3. [3] [Inductor] Document the actual ROWS_GUARANTEED_SAFE requirement (#194154) ↗ pytorch/pytorch
  4. [4] Route saves through the torch_checkpointing backend ↗ pytorch/torchtitan
  5. [5] Deprecate Forge under experimental ↗ pytorch/torchtitan

Quick answers

What shipped in PyTorch on September 4, 2026?
PyTorch's Inductor now correctly replays cond_fn mutations of captured tensors in while_loop, fixing silent wrong results in later compiled calls. In total, 85 commits and 32 pull requests landed.
Who contributed to PyTorch on September 4, 2026?
15 developers shipped this update, including Jason Ansel, Aditya Sharma, nithinsubbiah, Nikita Shulga, srhust, Anthony Shoumikhin, Sebastian-Larsson, and YufengShi-dudu, and 7 more.
What were the notable PyTorch updates?
[inductor] Replay cond_fn mutations of captured tensors in while_loop (#195393), [inductor] Fix incorrect grid size in test_graph_partition_user_defined_triton_kernel_reuse (#195546), and [Inductor] Document the actual ROWS_GUARANTEED_SAFE requirement (#194154).