Skip to content

refactor FSDPTest and FSDPTestMininx to be device-agnostic - #205271

Closed
fffrog wants to merge 14 commits into
gh/fffrog/168/basefrom
gh/fffrog/168/head
Closed

fffrog wants to merge 14 commits into
gh/fffrog/168/basefrom
gh/fffrog/168/head

Conversation

@fffrog

@fffrog fffrog commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/205271

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

❌ 12 New Failures, 5 Unrelated Failures

As of commit 9453485 with merge base 1340330 (image):

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

  • Triviality
    • Test changes: confined to torch/testing/_internal/common_fsdp.py, imported only by tests (trace_rules.py names it only as a string)
  • Removed code
    • FSDPTestMixin._run was dead: FSDPTest defines its own _run, and MultiProcContinuousTest never calls cls._run
    • FSDPTestContinuous keeps its own device_type, backend_str and world_size, so mixin additions do not reach it
  • Behavior of existing subclasses
    • Non-instantiated FSDPTest subclasses get the same device type, world size and backend as the old DEVICE_TYPE/DEVICE_COUNT/DISTRIBUTED_BACKEND
    • TestParityWithDDP and TestAutograd in test_fsdp_core.py are the only per-device FSDPTest classes, and they are instantiated only for accelerators
    • No FSDPTest subclass under test/ overrides device_type or backend_str; rank % world_size equals the old rank % DEVICE_COUNT whenever the test runs

reason: clean
Reviewed commit: 9453485

Inference job

🐛 Report a wrong verdict

NEW FAILURES - The following jobs have failed:

NEW FAILURES SUPPRESSED BY AI (non-blocking) - The following jobs failed, but the AI CI Advisor judged the failures not to be evidence against this change:

  • trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable) (gh)
    test_fx

    AI verdict: AI verdict: not related

    test_fx fails at import time because redis 8.2.0 (pulled in by the unpinned redis>=4.0.0 requirement) raises a BytesWarning at module level, which becomes an error under python -bb. The suspect's real diff only refactors torch/testing/_internal/common_fsdp.py, which is not in the failing import chain.

    Full reasoning on HUD →

  • trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable) (gh)
    inductor/test_halide

    AI verdict: AI verdict: not related

    test_halide fails while importing, before any test runs: the newly released redis 8.2.0 (unpinned redis>=4.0.0) raises a BytesWarning, which python -bb turns into an error. The suspect only changes torch/testing/_internal/common_fsdp.py, which is not in that import path.

    Full reasoning on HUD →

  • trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable) (gh)
    inductor/test_aot_inductor

    AI verdict: AI verdict: not related

    The failure isn't caused by this PR. inductor/test_aot_inductor fails while importing: the new redis 8.2.0 package raises a BytesWarning at import, and the test runs under python -bb, which turns that warning into an error. The suspect only changes torch/testing/_internal/common_fsdp.py, which this import chain never touches.

    Full reasoning on HUD →

  • trunk / macos-py3-arm64 / test (mps, 1, 1, macos-m2-26) (gh)
    test/nn/test_convolution.py::TestConvolutionNN::test_conv_shapecheck_meta_kernel_larger_than_input

    AI verdict: AI verdict: not related

    The test fails with a BytesWarning raised while importing the third-party redis 8.2.0 package, which is installed unpinned through requirements-ci.txt (redis>=4.0.0). The same test failed the same way, with the same redis version, on trunk commit cc43063, which predates the suspect's merge base. The PR only changes torch/testing/_internal/common_fsdp.py, and nothing in this path touches that file.

    Full reasoning on HUD →

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

pytorchgreenlight[bot]
pytorchgreenlight Bot previously approved these changes Nov 17, 2026
@pytorchgreenlight pytorchgreenlight Bot added the GL/approved Approved by GreenLight label Nov 17, 2026
@fffrog

fffrog commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot label "topic: not user facing"

[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 18, 2026
@pytorchgreenlight
pytorchgreenlight Bot dismissed their stale review November 18, 2026 09:53

Superseded by a newer greenlight verdict.

@pytorchgreenlight pytorchgreenlight Bot added GL/human GreenLight marked as needing human review and removed GL/approved Approved by GreenLight labels Nov 18, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 18, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 18, 2026
@fffrog

fffrog commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

Given that this PR (#205504) introduces large-scale changes, we should wait for a period of time (a few days) after it is merged to ensure that everything is functioning correctly.

[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 19, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 19, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 19, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 20, 2026
[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 22, 2026
@fffrog

fffrog commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 23, 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

[ghstack-poisoned]
fffrog added a commit that referenced this pull request Nov 23, 2026
@fffrog

fffrog commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 17 checks: pull / linux-jammy-py3.11-clang21-asan / test (default, 11, 18, lf-l-x86iavx512-16-128), trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (mps, 1, 1, macos-m2-26), trunk / win-vs2022-cpu-py3 / test (default, 2, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 1, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 10, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 12, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 8, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 5, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 3, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 4, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 7, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 9, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 6, 12, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 11, 12, windows.4xlarge.nonephemeral)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-triage-error ciflow/trunk Trigger trunk jobs on your pull request GL/approved Approved by GreenLight Merged open source topic: not user facing topic category

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants