Skip to content

Reuse workers for eager DTensor convolution tests - #197692

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

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

Conversation

@d4l3k

@d4l3k d4l3k commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

Stack from ghstack (oldest at bottom):

Reuse workers across eager convolution tests while keeping the compiler regression in a fresh-process class. Preserve rank count, LocalTensor skips and every test body.

Test plan: CUDA build and lint; 22 eager cases normally, in reverse order and after build (8 existing skips), plus 18 CPU cases. Baseline 58.18s; reused workers 15.77s before rebuild. AST comparison verifies all test bodies/decorators unchanged. The isolated compiler case was not run locally (Triton unavailable).

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

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

✅ No Failures

As of commit ea73f51 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
    • Only test/distributed/tensor/test_convolution_ops.py changes; no product code, no workflow or CI file touched
    • Every moved test body and decorator stack (with_tf32_off, with_comms, skip_if_lt_x_gpu) is reproduced verbatim in the diff
  • Infrastructure correctness
    • DTensorContinuousTestBase and LocalDTensorContinuousTestBase exist at common_dtensor.py:700 and :720, and create_local_tensor_test_class accepts base_class at :1246
    • world_size = 2 as a class attribute is handled by MultiProcContinuousTest._get_world_size (common_distributed.py:2045), which also supports the property form kept on DistConvolutionCompileTest
    • MRO holds for both generated classes: each base_class subclasses the original's base, and sys.exit skips from skip_if_lt_x_gpu are converted to SkipTest in _worker_loop (common_distributed.py:1978)
  • Coverage preservation
    • The compile regression test_conv2d_no_bias_compile keeps a fresh-process class on DTensorTestBase rather than a shared worker, so torch.compile state is not reused
    • test_conv2d_no_bias_compile moves from the eager class's skipped_tests into DistConvolutionCompileTestWithLocalTensor's, leaving the LocalTensor skip set unchanged
    • Same pattern is already in use for DTensorContinuousTestBase in test_redistribute.py:72 and test_embedding_ops.py:35

reason: clean
Reviewed commit: ea73f51

Inference job

🐛 Report a wrong verdict

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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #197694

pytorchmergebot pushed a commit that referenced this pull request Sep 19, 2026
Reuse workers with the same rank count and combined Gloo/NCCL backend. Apply the existing four-device requirement before worker initialization and destroy the extra Gloo group after its last use.

Test plan: CUDA build and lint; all four cases normally, in reverse order and after build; four expected skips with two or zero GPUs. Baseline 22.65s; reused workers 4.66s before rebuild.
Pull Request resolved: #197693
Approved by: https://github.com/pytorchgreenlight
ghstack dependencies: #197647, #197648, #197692
pytorchmergebot pushed a commit that referenced this pull request Sep 19, 2026
Reuse distributed workers for checkpoint consolidation while keeping no-process-group tests in a separate fresh-process class. Preserve all test bodies and the existing rank count.

Test plan: CUDA build and lint; all seven cases normally, in reverse order, on two GPUs and CPU, and after build. Baseline 33.43s; reused workers 15.32s before rebuild. AST comparison verifies every method body unchanged.
Pull Request resolved: #197694
Approved by: https://github.com/pytorchgreenlight, https://github.com/Skylion007
ghstack dependencies: #197647, #197648, #197692, #197693
@github-actions
github-actions Bot deleted the gh/d4l3k/182/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 Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants