Repository navigation
refactor(fsdp): share eager and graph shard geometry - #18
Open
yu-chen-code wants to merge 1 commit into
Open
yu-chen-code wants to merge 1 commit into
yu-chen-code wants to merge 1 commit into
Conversation
yu-chen-code
force-pushed
the
master-graph-shared-geometry
branch
from
November 11, 2026 13:11
11cf981 to
d834569
Compare
yu-chen-code
force-pushed
the
master-graph-shared-dtypes
branch
from
November 11, 2026 13:11
18643c9 to
1099804
Compare
yu-chen-code
force-pushed
the
master-graph-shared-geometry
branch
from
November 12, 2026 08:21
d834569 to
4877541
Compare
yu-chen-code
force-pushed
the
master-graph-shared-dtypes
branch
from
November 12, 2026 08:21
1099804 to
265e5b2
Compare
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.
What type of PR is this?
/kind feature
/kind refactor
What does this PR do / why do we need it:
Use one allocation-free
get_shard_geometryto calculate source-local chunk offsets, valid local shapes and padded communication shapes. Inputs use the actual parameter FSDP group's rank/degree and the shape after source EP/TP partitioning.Eager HSDP still materializes an unpadded valid Parameter; graph FSDP still keeps equal padded storage. Clone/contiguous/offload order, parameter selection, scalar/frozen/buffer handling and expert checks stay in their existing executors. This shares geometry without introducing a stateful shard-spec layer.
This stacked PR contains one commit over
master-graph-shared-dtypes; merge the precision/storage prerequisite first. This exact prefix passed 203 unit tests and 177 subtests. The integrated-series results below were measured on the aggregate head.The series uses new branches. Existing PR13 and PR15 branches are unchanged. This PR does not associate or close any issue.
Validation uses Python 3.12.13, PyTorch 2.15.0.dev20261005+cpu and torch-npu 2.15.0. The aggregate head has 205 focused unit tests and 181 subtests passing; the separate Inductor suite has 16 tests passing and two existing strict-equality subtest failures. Both failures reproduce on the exact master baseline with the same values (0.701689600944519 versus 0.7016897201538086); assertions are unchanged.
no scheduling registered for device npu; NPU Inductor execution is not claimed.Which issue(s) this PR fixes:
None
Code review checklist [illustration]: