Skip to content

[distributed] Reuse workers for DTensor initialization tests - #197653

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

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

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

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.

@pytorch-bot pytorch-bot Bot added ciflow/dtensor Run DTensor specific tests topic: not user facing topic category labels 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/197653

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

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

  • Scope
    • Only test/distributed/tensor/test_init.py changes; no production or CI/workflow file is touched
    • Swaps DTensorTestBase for DTensorContinuousTestBase to reuse process groups, matching the PR title
  • Established pattern
    • DTensorContinuousTestBase and LocalDTensorContinuousTestBase already exist at common_dtensor.py:700 and :720
    • Sibling files test_tensor_ops.py:40, test_redistribute.py:72, test_view_ops.py:45 already use the same base plus base_class=LocalDTensorContinuousTestBase
  • Behavior preservation
    • world_size = NUM_DEVICES (test_init.py:26) matches the old DTensorTestBase.world_size property at common_dtensor.py:791, and world_size = 4 keeps DTensorConstructorTest's prior rank count
    • with_comms passthrough applies because MultiProcContinuousTest exposes only classmethod _init_pg, not init_pg (common_distributed.py:1887, guard at common_dtensor.py:894)
    • The test_zeros_submesh skip in create_local_tensor_test_class is unchanged; all constructor and layout assertions remain
  • Test coverage
    • The diff is itself test code; the 18 existing assertions in DTensorInitOpsTest and DTensorConstructorTest are retained unmodified

reason: clean
Reviewed commit: b31d085

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.

This was referenced Sep 19, 2026
@d4l3k
d4l3k marked this pull request as ready for review September 19, 2026 04:20
d4l3k added 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.


ghstack-source-id: 62bf2c6
Pull-Request: #197653
@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/148/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 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