[AMD][Kimi K2.5 Day 0] ROCm: route W4A16 MoE to Triton and fix packed-weight loading#17863
Merged
HaiShaw merged 3 commits intosgl-project:mainfrom Jan 28, 2026
Merged
[AMD][Kimi K2.5 Day 0] ROCm: route W4A16 MoE to Triton and fix packed-weight loading#17863HaiShaw merged 3 commits intosgl-project:mainfrom
HaiShaw merged 3 commits intosgl-project:mainfrom
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
|
/tag-and-rerun-ci |
HaiShaw
approved these changes
Jan 28, 2026
Collaborator
HaiShaw
left a comment
There was a problem hiding this comment.
- This should for MI350/355 as well
- Can we add MoE triton tuning later?
Collaborator
Author
|
kkHuang-amd
reviewed
Jan 29, 2026
| if getattr(layer, "is_triton_converted", False): | ||
| return | ||
|
|
||
| num_experts = layer.w13_weight_packed.shape[0] |
Collaborator
There was a problem hiding this comment.
I don't see this variable "num_experts" is used in this function block, does it still need to exist?
Collaborator
Author
There was a problem hiding this comment.
Thanks for this nit! Will clean it today
charlesHsuGG
pushed a commit
to charlesHsuGG/sglang
that referenced
this pull request
Jan 30, 2026
Chen-0210
pushed a commit
to Chen-0210/sglang
that referenced
this pull request
Jan 30, 2026
2 tasks
sfiisf
pushed a commit
to sfiisf/sglang
that referenced
this pull request
Feb 5, 2026
Johnsonms
pushed a commit
to Johnsonms/sglang
that referenced
this pull request
Feb 14, 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.
Motivation
As issue #17854
On ROCm,
CompressedTensorsWNA16MoEMethodcurrently routes to Marlin kernels by default. Marlin is NVIDIA‑only, which breaks Kimi‑K2.5 (native INT4) on MI300X. This patch dispatches ROCm to Triton and fixes the weight‑loading transpose path to avoid shape mismatches.Modifications
python/sglang/srt/layers/quantization/compressed_tensors/compressed_tensors_moe.pyCompressedTensorsWNA16TritonMoEMethodand convert weights/scales to Triton layout.is_hip()is true.python/sglang/srt/layers/moe/fused_moe_triton/layer.pyCompressedTensorsWNA16TritonMoEMethodin packed‑weight transpose checks.Accuracy Tests
tested on gsm8k
Benchmarking and Profiling
Benchmark results here: notion.so/Kimi-K2-5-on-MI300X-2f5651cb22e580cb9395d6169ee59d66?pvs=73
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci