Skip to content

[distributed] Reuse workers for FSDP no_sync tests - #197707

Closed
d4l3k wants to merge 1 commit into
gh/d4l3k/193/basefrom
gh/d4l3k/193/head
Closed

d4l3k wants to merge 1 commit into
gh/d4l3k/193/basefrom
gh/d4l3k/193/head

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Reuse workers across the two original-parameter no_sync tests. Preserve two ranks, all sharding-strategy subtests, gradients and precision assertions.

Test plan: CUDA build and lint pass. Both tests pass normally and in reverse order: 10.621s before versus 5.059s after. Two-GPU run and post-build rerun pass; one-GPU and CPU runs preserve the two expected skips.

@pytorch-bot

pytorch-bot Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/197707

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit 6555c27 with merge base b7954b2 (image):

🟢 GREEN LIGHT - PR approved to be merged without human review:

  • Scope
    • Four-line diff changing only the declaration of TestFSDPUseOrigParamsNoSync in test/distributed/fsdp/test_fsdp_use_orig_params.py; both test bodies are unchanged.
    • FSDPTestContinuous is already imported at line 38 of that file, so no import change is needed.
  • Established pattern
    • TestFSDPUseOrigParamsUnshardReshard (line 571) and TestFSDPUseOrigParamsWriteback (line 875) in the same file already subclass FSDPTestContinuous with a world size of 2.
    • instantiate_parametrized_tests is already applied to TestFSDPUseOrigParamsUnshardReshard, so that pairing is precedented.
  • World size handling
    • _get_world_size reads a plain class attribute via its else branch at common_distributed.py:2058, matching the base declaration world_size: int = DEVICE_COUNT.
    • C10dTorchCommsTestBase at common_distributed.py:2245 uses the same class-attribute form, so dropping the @property is supported.
  • Preserved skips and worker reuse
    • skip_if_lt_x_gpu(2) still skips: its sys.exit is converted to unittest.SkipTest in _worker_loop at common_distributed.py:1978-1992.
    • Both tests build fresh models and optimizers per subtest, and setUp/tearDown barrier plus reset dynamo and RNG at common_fsdp.py:1638-1653.

reason: clean
Reviewed commit: 6555c27

Inference job

🐛 Report a wrong verdict

CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@d4l3k

d4l3k commented Sep 19, 2026

Copy link
Copy Markdown
Member Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 19, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@github-actions
github-actions Bot deleted the gh/d4l3k/193/head branch November 24, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants