Repository navigation
[PP][3/3] DTensor Pipeline Parallelism unit and integration tests - #177729
Closed
sanketpurandare wants to merge 1 commit into
Closed
sanketpurandare wants to merge 1 commit into
sanketpurandare wants to merge 1 commit into
Conversation
sanketpurandare
added a commit
that referenced
this pull request
Mar 18, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py (617 lines): - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py (838 lines): - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
March 18, 2026 11:55
6134f9a to
e87554b
Compare
sanketpurandare
force-pushed
the
sanketpurandare/stack/2
branch
from
March 18, 2026 11:55
382466f to
d653abe
Compare
This was referenced Mar 18, 2026
sanketpurandare
force-pushed
the
sanketpurandare/stack/2
branch
from
March 20, 2026 23:25
d653abe to
cb7d43d
Compare
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
March 20, 2026 23:34
e87554b to
a35d42c
Compare
sanketpurandare
added a commit
that referenced
this pull request
Mar 20, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py (617 lines): - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py (838 lines): - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
added a commit
that referenced
this pull request
Mar 23, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py (617 lines): - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py (838 lines): - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
March 23, 2026 21:32
a35d42c to
c0bb6b9
Compare
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
March 24, 2026 12:59
c0bb6b9 to
aae6a5a
Compare
sanketpurandare
added a commit
that referenced
this pull request
Mar 24, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py (617 lines): - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py (838 lines): - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
added a commit
that referenced
this pull request
Mar 24, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py (617 lines): - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py (838 lines): - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 9, 2026 09:26
46850dc to
a9bcf18
Compare
sanketpurandare
added a commit
that referenced
this pull request
Apr 9, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
added a commit
that referenced
this pull request
Apr 9, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 9, 2026 11:16
a9bcf18 to
f13d3fd
Compare
pytorchmergebot
pushed a commit
that referenced
this pull request
Apr 9, 2026
Stacked PRs: * #177729 * #177728 * __->__#177727 --- --- --- ### [PP][1/3] DTensor metadata foundation for Pipeline Parallelism Summary: Introduces core DTensor metadata types, helper infrastructure, and utility additions for DTensor-aware Pipeline Parallelism (PP). This commit adds: - Foundational metadata dataclasses: _TensorMeta, _DTensorMeta, _StageMeta, _StageForwardMeta, _StageBackwardMeta - InferenceMode enum (STATIC/DYNAMIC) - _MeshCache for DeviceMesh caching with get_mesh() API and GetMeshCallback protocol - to_tensor(device) / to_dtensor(device, mesh) methods on metadata classes - Refactored flatten_args with optional detach parameter - DTensor-aware microbatch splitting/merging in microbatch.py - Metadata extraction helpers: extract_tensor_meta, extract_tensor_metas, to_local_if_dtensor, validate_and_normalize_to_tuple - TensorMeta-based validation: validate_metadata, validate_static_arg_grad_correspondence - _derive_grad_metas for gradient metadata derivation - _autograd_grad_for_inputs and refactored stage_backward_input in _backward.py - Grad context and detach fixes in test_schedule_multiproc.py Legacy functions (PipeliningShapeError, validate_tensor_metadata, old validate_tensors_metadata) are kept for backward compatibility — removed in the next commit. Test Plan: python -m pytest test/distributed/pipelining/ -x Pull Request resolved: #177727 Approved by: https://github.com/wconstab, https://github.com/acisseJZhong
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 9, 2026 13:29
f13d3fd to
82e7b31
Compare
sanketpurandare
added a commit
that referenced
this pull request
Apr 9, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
added a commit
that referenced
this pull request
Apr 9, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 9, 2026 19:51
82e7b31 to
5f89142
Compare
pytorchmergebot
pushed a commit
that referenced
this pull request
Apr 9, 2026
Stacked PRs: * #177729 * __->__#177728 Fixes #172419 --- --- --- ### [PP][2/3] DTensor-aware stage and schedule refactoring Summary: Refactors PipelineStage and schedule infrastructure for DTensor-aware Pipeline Parallelism, migrating to the new metadata utilities from [1/3]. Key changes in stage.py: - Refactored _PipelineStageBase, _PipelineStage, PipelineStage for DTensor support with STATIC/DYNAMIC inference modes - Replaced _RootArgPlaceholder with unified _RecvInfo.is_root_arg flag - New _prepare_forward_infra/_prepare_backward_infra for metadata-driven initialization with DTensor shape/placement tracking - Replaced PipeliningShapeError with PipeliningMetadataError - Added _validate_fwd_inputs using new TensorMeta-based validation - _make_tensor_from_meta moved from stage.py to _utils.py Key changes in schedules.py: - Added _determine_and_set_global_inference_mode() for cross-stage consensus on STATIC vs DYNAMIC mode - Refactored _initialize_stage(s) with mode-change detection - Updated step() callers to extract first_target from target_mbs Key changes in _utils.py: - Replaced old validate_tensors_metadata (torch.Tensor signature) with new TensorMeta-based version - Removed legacy backward-compat shims: PipeliningShapeError, validate_tensor_metadata, old validate_tensors_metadata Test fixes: - test_stage.py: PipeliningShapeError -> PipeliningMetadataError Test Plan: python -m pytest test/distributed/pipelining/ -x Pull Request resolved: #177728 Approved by: https://github.com/wconstab
sanketpurandare
added a commit
that referenced
this pull request
Apr 9, 2026
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 9, 2026 22:44
5f89142 to
721ea2b
Compare
Summary: Adds comprehensive test suites for DTensor-aware Pipeline Parallelism. test_dtensor_pp_unit_tests.py: - Tests for _TensorMeta, _DTensorMeta metadata validation - Tests for _StageMeta, _StageForwardMeta, _StageBackwardMeta - Tests for InferenceMode enum and _MeshCache - Tests for _RecvInfo with is_root_arg - Tests for validate_tensors_metadata with TensorMeta inputs - Tests for _make_tensor_from_meta DTensor reconstruction test_dtensor_pp_integration.py: - Multi-process integration tests for DTensor PP - Tests STATIC and DYNAMIC inference modes end-to-end - Tests ScheduleGPipe, Schedule1F1B, ScheduleInterleaved1F1B with DTensor inputs across multiple ranks - Tests DTensor microbatch splitting and gradient propagation - Tests DeviceMesh integration with PP world groups Test Plan: python -m pytest test/distributed/pipelining/ -x stack-info: PR: #177729, branch: sanketpurandare/stack/3
sanketpurandare
force-pushed
the
sanketpurandare/stack/3
branch
from
April 10, 2026 14:50
721ea2b to
7c84d9b
Compare
Contributor
Author
|
@pytorchbot merge -f "Unrelated Failures and 1 rocm job stuck. All distributed jobs passing." |
Collaborator
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs:
[PP][3/3] DTensor Pipeline Parallelism unit and integration tests
Summary:
Adds comprehensive test suites for DTensor-aware Pipeline Parallelism.
test_dtensor_pp_unit_tests.py:
test_dtensor_pp_integration.py:
with DTensor inputs across multiple ranks
Test Plan:
python -m pytest test/distributed/pipelining/ -x