$ the-wire · showcase
Inductor stops reinplacing index_put, ExecuTorch fixes ConvTranspose BatchNorm fusion
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
Today's wire is a correctness day: a wrong-value fix in the Inductor reinplace pass, a silently wrong BatchNorm fold for transposed convolutions, and negative padding finally matching eager PyTorch.
[inductor] Don't reinplace index_put when indices or values share storage with the input (#198637) pytorch/pytorch
The reinplace pass converted index_put(x, [idx], val) into index_put_ without checking whether idx or val read x's own storage. For torch.put(r, r, r, accumulate=True) the kernel then read indices and values from the buffer it was writing, producing wrong results on CPU and tripping aten's overlap check on CUDA.
Fix FuseBatchNormWithConvPass for transposed convolutions pytorch/executorch
FuseBatchNormWithConvPass folded BatchNorm on the input-channel axis after a ConvTranspose, which gave wrong values when in == out and a shape error otherwise; the fix passes transpose= and handles grouped transposed weights. Four of the six cases in backends/transforms/test/test_fuse_batch_norm_with_conv.py failed before it, so any exported model with a transposed conv followed by BatchNorm wa...
Support negative padding in constant_pad_nd pytorch/executorch
constant_pad_nd now crops the input before applying positive padding, matching PyTorch's handling of negative padding, with the optimized library receiving the same fix through its fallback registration. Mixed cropping and padding, empty tensors, fully cropped inputs, and channels-last layouts are covered, and excessive cropping or output-dimension overflow is rejected.
Reject packed documents in DeepSeek V4 sparse attention pytorch/torchtitan
get_attention_masks() discarded position IDs, so packed documents with reset positions could cross document boundaries in DeepSeek V4 sparse attention. Non-padding reset positions are now rejected at the model mask hook with a NotImplementedError; single-document inputs and padding-only resets keep the existing None mask contract.
[qwen3.5] Tie embeddings for the 0.8B, 2B, and 4B flavors (#4916) pytorch/torchtitan
The torchtitan configs for the Qwen3.5-0.8B, 2B, and 4B flavors kept a separate lm_head even though those Hugging Face checkpoints set tie_word_embeddings=true and store no lm_head.weight, so loading failed with "Missing key in checkpoint state_dict: lm_head.weight." Weight tying is now enabled for all three flavors, matching what the Qwen3 small flavors already do.
[ROCm][test]Reuse device meshes across ComposabilityTest cases (#198299) pytorch/pytorch
ComposabilityTest, a MultiProcContinuousTest, rebuilt a DeviceMesh for every test, and each mesh creates new NCCL communicators that hold roughly 40 MB of proxy-ops segment per rank in /dev/shm on RCCL. The class accumulated about 10 GB and hit ENOSPC on 10 GiB /dev/shm containers; meshes are now reused across cases.