Repository navigation
[Fix] eplb: Load all local replicas of each expert #45363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kpham-sgl
merged 7 commits into
sgl-project:main
from
zanes-ops:eplb-load-all-local-replicas
Oct 27, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
379410c
[Fix] eplb: Load all local replicas of each expert
zanes-ops e341e59
Merge branch 'main' into eplb-load-all-local-replicas
zanes-ops ea96862
Merge branch 'main' into eplb-load-all-local-replicas
zanes-ops a682f73
Drop the filter comment in moe_wna16._local_expert_ids
zanes-ops 0aca8cb
Merge branch 'main' into eplb-load-all-local-replicas
zanes-ops dae2f5a
Merge branch 'main' into eplb-load-all-local-replicas
ShangmingCai 70a6d81
Merge branch 'main' into eplb-load-all-local-replicas
ShangmingCai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks to cost the same as before.
[Agent check]
A CPU microbench at DSV3 shape (58 layers × 256 logical × 288 physical, 89k calls ≈ one reload's worth of
w1/w2/w3+ scales) gives 3.66 µs/call here vs 3.38 µs for the oldl2p[l, e].tolist()+ filter, ~0.33 s vs ~0.30 s per full reload, per rank.My suggestion:
a follow-up could build a
List[List[List[int]]]fromphysical_to_logical_map_cpu.tolist()once in_init_raw/update(~1 ms). That makes this lookup 0.08 µs/call, so ~0.3 s → ~8 ms. The old code had the same cost, so don't really feel u need to add pr scope.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for measuring it. Agreed, caching the inverse map once per update can be a separate follow-up; I'll keep this PR to the loading fix.