Skip to content

[pls don't review yet] Prototype spmd_types graph trainer SimpleFSDP - #4160

Closed
pianpwk wants to merge 16 commits into
gh/pianpwk/78/basefrom
gh/pianpwk/78/head
Closed

pianpwk wants to merge 16 commits into
gh/pianpwk/78/basefrom
gh/pianpwk/78/head

Conversation

@pianpwk

@pianpwk pianpwk commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

[ghstack-poisoned]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 14, 2026
(the routed-expert weights) are separately wrapped on the EDP mesh when expert
parallelism is enabled.
"""
use_local_compute = parallel_dims.spmd_backend == "spmd_types"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we directly call it spmd_backend: str or use_spmd_types: bool

@@ -172,6 +177,8 @@ def __init__(
mode: str,
mp_policy: MixedPrecisionPolicy | None,
full_dtensor: bool = False,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pleaser remove this flag

@pianpwk pianpwk changed the title Prototype spmd_types graph trainer SimpleFSDP [don't review yet i didn't even read the code] Prototype spmd_types graph trainer SimpleFSDP Aug 15, 2026
@pianpwk pianpwk changed the title [don't review yet i didn't even read the code] Prototype spmd_types graph trainer SimpleFSDP [pls don't review yet] Prototype spmd_types graph trainer SimpleFSDP Aug 15, 2026
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 17, 2026
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 17, 2026
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 17, 2026
pianpwk added a commit that referenced this pull request Aug 17, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.13.0)
(oldest at bottom):
* #4160
* #4085
* __->__ #4154

maybe I missed this, caught while trying to migrate backends, MoE
training w/ TP wasn't bitwise, as spmd_types didn't reduce routing bias
over TP axis. Refactor logic to get local tensor, reduce TP, then reduce
DP+CP. Set test to spmd_types backend without updating 100-step loss
reference.

`NGPU=2 ./run_train.sh --module qwen3 --config qwen3_moe_debug
--parallelism.tensor_parallel_degree 2 --parallelism.spmd_backend
spmd_types --training.disable_cuda_graphs --training.steps 10
--debug.seed 42 --debug.deterministic`
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 17, 2026
ghstack-source-id: 41dbd4d
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 17, 2026
ghstack-source-id: bda0ca2
Pull Request resolved: #4160
@pianpwk pianpwk closed this Aug 17, 2026
@pianpwk pianpwk reopened this Aug 17, 2026
pianpwk added a commit that referenced this pull request Aug 17, 2026
ghstack-source-id: bda0ca2
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 18, 2026
ghstack-source-id: 0c56768
Pull Request resolved: #4160
pianpwk added a commit that referenced this pull request Aug 18, 2026
keeps graph trainer, hf backend on "partial_dtensor" backend

Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0)
(oldest at bottom):
* #4160
* __->__ #4085
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 18, 2026
ghstack-source-id: dc88848
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 21, 2026
ghstack-source-id: 21548c0
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 21, 2026
ghstack-source-id: 07e72a3
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 24, 2026
ghstack-source-id: ad15c6f
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 24, 2026
ghstack-source-id: 51be30d
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 24, 2026
ghstack-source-id: 1b01292
Pull Request resolved: #4160
pianpwk added a commit that referenced this pull request Aug 24, 2026
ghstack-source-id: 1b01292
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 24, 2026
ghstack-source-id: 91fb32e
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 25, 2026
ghstack-source-id: 6e1606c
Pull Request resolved: #4160
[ghstack-poisoned]
pianpwk added a commit that referenced this pull request Aug 25, 2026
ghstack-source-id: 47cd9ac
Pull Request resolved: #4160
@tianyu-l tianyu-l closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rl ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants