Conversation
Adds a fused GptOssMoE operator (sparse top-4 INT4 Mixture-of-Experts) used by GPT-OSS-20B: core op (op/gptoss_moe.hpp), ONNX contrib parser (parse_gptoss_moe.cpp), GPU op + device kernels (gpu/gptoss_moe.*, device/moe.*), op registration (onnx.cpp registry re-query, lowering.cpp add_extend_op, CMakeLists). Verified on gfx1151 (Strix Halo): GPT-OSS-20B decodes coherently, ~56 tok/s. Co-Authored-By: Claude <noreply@anthropic.com>
pfultz2
requested changes
Sep 14, 2026
| make_op("convert", {{"target_type", shape::float_type}}), args[0]); | ||
| } | ||
|
|
||
| auto moe = info.add_instruction(make_op("gptoss_moe", |
Collaborator
There was a problem hiding this comment.
This shouldn't add a new kernel. It should use the existing operators in migraphx.
rlegithub
marked this pull request as ready for review
September 14, 2026 21:21
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.
Summary
Adds a fused
GptOssMoEoperator — sparse top-4 INT4 Mixture-of-Experts — used by GPT-OSS-20B on the OGA → ONNX Runtime → MIGraphX path (gfx1151 / Strix Halo).op/gptoss_moe.hpp; ONNX contrib parseronnx/parse_gptoss_moe.cppgpu/gptoss_moe.*,gpu/device/moe.*(routing + fused INT4 dequant expert GEMMs)onnx.cpp(registry re-query),lowering.cpp(add_extend_op), CMakeLists1 of 3 PRs enabling GPT-OSS-20B (with the SLN-FP32 and GQA-attention-sink PRs); the model needs all three to decode.
Test plan