[Raiden Weight Sync 3/7] MoE 128-lane layout and padding for TPU GMM kernels - #5168
Merged
Merged
Conversation
YixuanWang-99
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
darisoy,
dipannita08,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
richjames0,
shralex,
shuningjin,
vipannalla and
xibinliu
as code owners
September 9, 2026 01:22
This was referenced Sep 9, 2026
Merged
There was a problem hiding this comment.
Code Review
This pull request introduces MoE padding utilities, unit tests, and compatibility shims for Tunix/tpu-inference weight sync, alongside refactoring convert_utils.py and qwen35_moe.py to support TPU GMM_v2 kernel alignment. Feedback focuses on preventing potential crashes on non-glibc systems when loading libc, avoiding abstract ShapeDtypeStruct returns when concrete arrays are present, optimizing padding logic to reduce memory overhead, validating head divisibility, and properly handling negative scan_axis indices in bounds checks.
igorts-git
reviewed
Sep 9, 2026
igorts-git
reviewed
Sep 9, 2026
igorts-git
reviewed
Sep 9, 2026
khatwanimohit
force-pushed
the
yixuann-m1-raiden-unscan
branch
2 times, most recently
from
September 9, 2026 21:24
0172b97 to
309aade
Compare
SurbhiJainUSC
force-pushed
the
yixuann-m2-moe-fused-layout
branch
16 times, most recently
from
September 9, 2026 23:13
96fecff to
bd2cbd8
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
igorts-git
approved these changes
Sep 9, 2026
- Add 128-lane interleaving and padding in convert_utils - Remove dead scan_fused_axis parameter - Add compute_padded_moe_mlp_dim in moe_padding - Add unit tests for convert_utils padding and fusion
SurbhiJainUSC
force-pushed
the
yixuann-m2-moe-fused-layout
branch
from
September 9, 2026 23:56
bd2cbd8 to
bd64e03
Compare
khatwanimohit
approved these changes
Sep 10, 2026
hengtaoguo
approved these changes
Sep 10, 2026
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.
Overview
Part of the stacked Raiden weight-sync enablement PR chain replacing #5089.
Pairs with Tunix [T5] (
google/tunix).Stack:
Details
convert_utils.pyto match TPU GMM kernel requirements (gmm_v2.py).compute_padded_moe_mlp_diminconvert_utils.py.tests/post_training/unit/convert_utils_test.py.Verification
pytest tests/post_training/unit/convert_utils_test.py(6/6 passed).Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.