Skip to content

[distributed] Reuse mixed precision training workers - #197678

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

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

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Reuse the continuous FSDP fixture for five mixed precision training tests, preserving rank counts, scoped collective patches, and all test bodies. Leave single-test JVP and threaded cast fixtures unchanged.

Test plan: CUDA build and lint pass; five four-GPU tests improve from 62.716s to 34.871s, reversed order 34.825s, postbuild 33.498s. Two GPUs pass in 12.796s; one and zero GPUs preserve five skips.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Sep 19, 2026
@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/197678

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 91cfcfb with merge base b7954b2 (image):

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

  • Rank count preserved
    • world_size = min(4, torch.get_device_module(device_type).device_count()) is the same expression the removed property returned, and MultiProcContinuousTest._get_world_size handles a plain class attribute (common_distributed.py:2051-2066)
  • Fixture contract holds
    • FSDPTestContinuous supplies process_group, run_subtests, per-test dist.barrier, torch._dynamo.reset and set_rng_seed in setUp/tearDown (common_fsdp.py:1605-1657), which the five tests rely on
    • _init_pg exits with TEST_SKIPS[multi-device-N] and _worker_loop maps that to unittest.SkipTest, so the @skip_if_lt_x_gpu(2) skips on 0/1-GPU hosts still report as skips
  • Scope
    • Test-only edit to test_fully_shard_mixed_precision.py; no test body changed, FSDPTest import is still used by TestFullyShardMixedPrecisionJVP at line 633, and no other class subclasses the migrated one
    • Matches the existing in-tree migration: ~25 FSDP test classes already derive from FSDPTestContinuous, e.g. TestReplicateMixedPrecisionTraining with world_size = 2

reason: clean
Reviewed commit: 91cfcfb

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 21, 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 21, 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

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.

3 participants