Skip to content

Reuse workers for uneven DTensor allocation tests - #197690

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

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

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Reuse distributed workers across the four uneven-stride allocation tests while preserving the existing rank count and assertions.

Test plan: CUDA build and lint; four cases in normal and reversed order, CPU fallback and two-GPU runs. Four-GPU runtime drops from 22.39s to 5.53s after build.

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

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

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

  • Scope
    • Test-only 4-line change in test/distributed/tensor/test_tensor_ops.py; reparents TestNewEmptyStridedUneven and swaps one import
    • No production code, workflow, or docs touched; the four test bodies and their assertions are byte-identical
  • Rank count preserved
    • Old DTensorTestBase.world_size is a property returning NUM_DEVICES (common_dtensor.py:790-792), and the new class var is world_size = NUM_DEVICES
    • MultiProcContinuousTest._get_world_size keeps a non--2 class var as-is (common_distributed.py:2051-2066), so self.world_size * 2 + 1 shapes are unchanged
  • Base-class fit
    • DTensorContinuousTestBase defines no init_pg, so @with_comms takes its documented passthrough branch (common_dtensor.py:894-896) — the same pattern DistTensorOpsTest already uses at line 52
    • _ensure_processes_spawned keys on cls.__dict__ and resolves the device_type property against the class (common_distributed.py:2087-2107), which this class satisfies
  • Import hygiene
    • DTensorTestBase has no remaining reference in the file; only LocalDTensorTestBase is still used, at lines 1550 and 1639

reason: clean
Reviewed commit: 342b7fe

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.

@Skylion007

Copy link
Copy Markdown
Collaborator

@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/180/head branch November 23, 2026 01:50
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.

3 participants