Repository navigation
feat(compile): share FSDP precision policy and prepare graph storage - #17
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-dtypes
branch
from
November 11, 2026 13:11
18643c9 to
1099804
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:
Prepare graph FSDP storage before optimizer creation and lower the existing eager precision policy into joint forward/backward capture. Logical source-local shapes are retained separately from physical shards; preparation preserves Parameter identity, runs once and exposes final layouts before lazy capture.
FSDP2Manager resolves the same policy, custom source-parameter overrides and module boundaries for both executors. A shared pure
resolve_param_dtypesretains eager override/explicit-None/redundant-cast rules. Graph capture records input/output casts and compute parameter views, differentiates those views, then reduces gradients in the selected or actual gradient dtype before storage/FP32-main accumulation. Eager scheduling and gradient communication fallback remain unchanged.This is the first commit of the series, based on fork master. The necessary storage/mixed-precision foundation from PR13 is included here. This exact prefix passed 200 unit tests and 123 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]: