Skip to content

[distributed] Reuse context parallel argument test workers - #197705

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

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

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Reuse workers for FLEX and SDPA input-argument tests, preserving two ranks and all mock, layout, and value assertions. Keep attention execution and sharding-registration tests on their existing fixtures.

Test plan: CUDA build and lint; eight tests in normal/reverse order and CPU/single-visible-GPU fallback. Runtime drops from 38.086s to 9.019s; reverse 8.716s.

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

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

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

  • Scope
    • Test-only diff: TestContextParallelStyle and TestContextParallelStyleSDPA in test/distributed/tensor/test_attention.py reparented to DTensorContinuousTestBase, no product code touched.
    • Attention-execution and sharding classes (RingAttentionTest, TestSharding) keep DTensorTestBase, matching the stated intent to move only the argument-handling suites.
  • Harness compatibility
    • DTensorContinuousTestBase (common_dtensor.py:700) mixes DTensorTestMixin into MultiProcContinuousTest, so device_type/build_device_mesh and the existing world_size-2 mesh construction resolve unchanged.
    • world_size must become a class attribute: _ensure_processes_spawned (common_distributed.py:2093-2107) evaluates the device_type property against cls before setting world_size, so a property form would feed a property object into _get_device_type.
    • with_comms takes its documented passthrough branch (common_dtensor.py:894) since the continuous base defines no init_pg; the process group instead comes from _init_pg in the persistent worker loop.
  • Coverage preserved
    • All eight tests and every mock, Shard(2) placement, and assert_close value assertion are unchanged in the diff; only the base class and world_size form differ.
    • Same base/world_size combination is already established in test/distributed/tensor/test_tensor_ops.py:40 and test/distributed/tensor/test_view_ops.py:45, including @with_comms tests.

reason: clean
Reviewed commit: 1073af8

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/191/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/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