Skip to content

[distributed] Reuse workers for DTensor decomposition tests - #197652

Closed
d4l3k wants to merge 2 commits into
gh/d4l3k/147/basefrom
gh/d4l3k/147/head
Closed

d4l3k wants to merge 2 commits into
gh/d4l3k/147/basefrom
gh/d4l3k/147/head

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Use the continuous DTensor harness for the two real-process-group decomposition cache tests, preserving the original rank count. Leave the fake-process-group tests unchanged.

Test plan: CUDA build and lint; all seven file tests in normal/reverse order and one-visible-GPU CPU fallback. Postbuild runtime 5.8s versus 12.2s baseline.

@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/197652

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

✅ No Failures

As of commit bd9c271 with merge base b7954b2 (image):
💚 Looks good so far! There are no failures yet. 💚

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

  • Scope
    • Test-only change: test/distributed/tensor/test_decompositions.py swaps one class's base to DTensorContinuousTestBase and sets world_size = NUM_DEVICES
    • TestDecompSharding(TestCase) and its fake-PG tests at lines 24-247 are untouched, and DTensorTestBase has no other reference left in the file
  • Harness correctness
    • Rank count is preserved: the old DTensorTestBase.world_size property also returned NUM_DEVICES (common_dtensor.py:791-792)
    • @with_comms safely no-ops here because DTensorContinuousTestBase defines no instance init_pg, and with_comms guards on hasattr(self, "init_pg") (common_dtensor.py:894-896)
    • CPU fallback and multi-device skips still hold via _get_device_type (common_dtensor.py:635-641) and the TEST_SKIPS exit in DTensorContinuousTestBase._init_pg (common_dtensor.py:707-717)
  • Consistency with existing usage
    • Identical DTensorContinuousTestBase plus world_size = NUM_DEVICES plus @with_comms shape already in test/distributed/tensor/test_embedding_ops.py:35-36
    • self.world_size used by test_decomp_schema_for_cache_aminmax is populated by MultiProcContinuousTest._run_test_given_id (common_distributed.py:1913)

reason: clean
Reviewed commit: bd9c271

Inference job

🐛 Report a wrong verdict

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

@pytorch-bot pytorch-bot Bot added ciflow/dtensor Run DTensor specific tests topic: not user facing topic category labels Sep 19, 2026
This was referenced Sep 19, 2026
@d4l3k
d4l3k marked this pull request as ready for review September 19, 2026 04:19
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #197653

pytorchmergebot pushed a commit that referenced this pull request Sep 19, 2026
Reuse process groups within DTensor initialization and constructor classes. Preserve rank counts, the LocalTensor variant, and all constructor/layout assertions.

Test plan: CUDA build and lint; all 18 file tests in normal and reverse order, plus one-visible-GPU CPU fallback. Existing LocalTensor submesh skip preserved. Runtime falls from 56.6s to 14.0s.
Pull Request resolved: #197653
Approved by: https://github.com/pytorchgreenlight
ghstack dependencies: #197647, #197648, #197652
@github-actions
github-actions Bot deleted the gh/d4l3k/147/head branch November 23, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/dtensor Run DTensor specific tests Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants