The Wire · Showcase
FSDP2 CRASH FIXED, EXECUTORCH BUILD PIPELINE REPAIRED AFTER COMMIT PROMOTION BUG
By RepoJournal · Filed · About PyTorch
PyTorch's distributed training guard catches an AttributeError that was silently breaking gradient accumulation in sharded models, while ExecuTorch's nightly builds restart after a scheduling bug locked out half of all commits.
The FSDP2 fix [1] addresses an unguarded access to `_unsharded_param` in `to_accumulated_grad_if_needed` that threw AttributeError when the gradient was missing, a dangerous condition in distributed training. Separately, ExecuTorch's viable/strict promotion system [2] was advancing only from commits whose position in history was divisible by 4, leaving every other commit permanently ineligible for nightly builds and breaking the manual promotion escape hatch. The TorchRL dtype preservation fix [3] ensures `TruncatedNormal.rsample()` respects the location tensor's dtype instead of upcasting through the global default, correcting a silent behavior change that could break downstream sampling code. Across testing, the team hardened distributed test infrastructure: PrivateUse1 accelerators now get microbatch test coverage [4], backend availability checks use the unified `c10d.is_backend_available` API instead of hardcoded dicts [5], and test_store classifies all 17 test cases with hardware labels [6]. A CUDA multinomial optimization [7] removes dead code from the without-replacement path, eliminating an unnecessary device-to-device copy.
One email a day. Unsubscribe in one click.
Keep up with PyTorch in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Deploy FSDP2 fix to prevent gradient accumulation crashes in distributed training pytorch/pytorch [immediate]
- → Land ExecuTorch viable/strict promotion fix to restore nightly build eligibility pytorch/executorch [immediate]
- → Pull TorchRL dtype preservation fix to prevent sampling behavior regression pytorch/rl [plan]
References
- [1] [FSDP2] Guard _unsharded_param access in to_accumulated_grad_if_needed (#194058) pytorch/pytorch
- [2] Promote commits to viable/strict on a schedule, not by commit count (#22064) pytorch/executorch
- [3] [BugFix] Preserve TruncatedNormal sample dtype (#4137) pytorch/rl
- [4] [Testcase Refactoring] Enable PrivateUse1 tests and add hw-classification in test_microbatch (#190422) pytorch/pytorch
- [5] [Testcase Refactoring] Use is_backend_available for MultiProcContinuousTest backend check (#192186) pytorch/pytorch
- [6] [Testcase Refactoring] Add hw_classification to test_store (#192036) pytorch/pytorch
- [7] [CUDA] Remove unused multinomial probability copy (#194391) pytorch/pytorch