Repository navigation
Fix: post-load staging regression breaks offload meta/sharded_gpu modes - #38779
Merged
Merged
Conversation
Collaborator
|
/tag-and-rerun-ci |
Contributor
Author
|
/rerun-failed-ci |
10 similar comments
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Hide-on-bushsh
force-pushed
the
offloader
branch
from
September 18, 2026 01:32
4309e7f to
338ace2
Compare
Contributor
Author
|
/rerun-failed-ci |
4 similar comments
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
Collaborator
|
only failed test/registered/utils/test_numa_utils.py, and it repaired by #40055 |
4 of 5 tasks
This was referenced Sep 21, 2026
2 tasks done
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.
Motivation
The offloader (V2,
--offload-group-size) intentionally parks offloaded parameters on the meta device through weight post-processing:--offload-mode=meta: all offloaded params become meta at build time (weight loading is a no-op via a replacedweight_loader).--offload-mode=sharded_gpu/shm_cpu: non-rank-0 DP ranks park params on meta during loading (rank 0 owns the real data).This is by design: device kernels skip meta params (e.g.
npu_format_casthas an explicit meta skip), and the olddevice_loading_contextpassed meta tensors through untouched. Since #35180,process_weights_after_loadinghits the new upfront check and the scheduler dies during startup:RuntimeError: Cannot post-process meta tensor FusedMoE.w13_weight
The bug is device-agnostic (same code path on CUDA/NPU); it was caught by the NPU offload CI suites (
test_npu_offload_modes.py,test_npu_offload_group_size.py).Modifications
In
stage_module_for_post_load(), record tensors that are already meta at context entry and pass them through untouched — no staging, no restore — restoring the pre-#35180 behavior for offloader-parked params.The original guard is preserved: tensors that become meta during post-load processing still raise, so genuine kernel bugs keep failing fast.
for test_npu_offload_modes.py


before
after
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #35295705325
Latest PR Test (Extra): ❌ Run #35295705264
Latest PR Test (AMD ROCm 10): ❌ Run #35295705315