PyTorch fixes PP composability by reversing decorator ordering in 4 tests
Short-GPU workers were exiting prematurely due to decorator stacking bug...
PyTorch, the popular deep learning framework, has fixed a subtle bug affecting pipeline parallelism (PP) test composability. The issue arose from incorrect decorator ordering: the GPU-count skip decorator was wrapping the sandcastle silent-pass decorator, causing workers with limited GPUs to exit prematurely instead of silently passing the tests. Contributor aditvenk identified the problem and reversed the two decorators on four specific tests.
The fix ensures that the silent-pass decorator runs first, allowing workers in constrained GPU environments (like sandcastle) to properly skip tests without crashing. By keeping the change at the call sites rather than modifying shared skip logic, the solution remains targeted and low-risk. The pull request (https://github.com/pytorch/pytorch/pull/191039) was approved by reviewers weifengpy and sanketpurandare, and was created with assistance from Codex, an AI coding assistant. This improvement helps maintain PyTorch's reliability across diverse hardware configurations.
- Bug: GPU-count skip decorator wrapped sandcastle silent-pass decorator, causing premature exits in short-GPU environments
- Fix: Reversed decorator order on 4 affected tests to ensure silent-pass executes first
- Change kept at call sites to avoid altering shared skip behavior across the codebase
Why It Matters
Fixes a composability bug in PyTorch PP that caused test failures on limited GPU machines.