[ROCm][Perf] Dispatch Kimi-K3 KDA group64 projection - #50666
Closed
JohnQinAMD wants to merge 1 commit into
Closed
JohnQinAMD wants to merge 1 commit into
JohnQinAMD wants to merge 1 commit into
Conversation
Prepack the fixed TP8 projection at model load and dispatch through a fail-closed AMD-only path while preserving the common fallback. Assisted-by: OpenAI Codex Signed-off-by: Yanyuan Qin <yanyuan.qin@amd.com>
JohnQinAMD
requested review from
AndreasKaratzas,
DarkLight1337,
tdoublep,
tomeras91 and
ywang96
as code owners
August 1, 2026 08:39
13 tasks
Member
|
Nobody is going to easily review a FULLY vibe coded PR. |
JohnQinAMD
marked this pull request as draft
August 2, 2026 20:24
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
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.
Purpose
Prepack Kimi-K3's fixed TP8 KDA input projection after checkpoint loading and
dispatch it through the AITER gfx950 group-64 kernel.
The common KDA layer exposes one protected projection seam whose default calls
the same linear layer as before. The AMD subclass owns nonpersistent packed
buffers and overrides only that seam. The adapter fails closed on AITER
availability, HIP, gfx950, shape, dtype, device, layout, and packed-weight
support. It adds no public tuning option and does not change NVIDIA dispatch.
Depends on ROCm/aiter#4499.
Test plan
Tested on 8x MI355X (
gfx950) with the public Kimi-K3 image andmoonshotai/Kimi-K3@9f62e4e9. The AITER #4499 kernel head is5f5dd2b5; thecommand below pins the vLLM base and PR revisions.
Fetch and verify the vLLM source:
Use complete verified vLLM/AITER trees as overlays on the public image,
including AITER
csrc/andhsa/; do not copy individual files. Verifyimport vllm, vllm._C, aiterbefore testing.Serve both source-isolated arms with identical flags:
After one 8K/128 warmup, run three 8K/1K batch-one trials with seeds 1--3,
temperature zero, and
--ignore-eos. Run fulllm-eval==0.4.12GSM8K on botharms: 1,319 questions, 5-shot, greedy completion, 2,048 generated tokens,
concurrency 128, and seed 42.
Test results
git diff --check, and DCO passed.The real-weight operator check reported relative RMSE
1.25e-7and cosinesimilarity
1.0against the dequantized group-64 oracle.Full GSM8K: control 1273/1319, candidate 1279/1319, zero invalid or
transport failures; 14 wins/8 losses (
p=0.2863). This paired run found nostatistically detectable accuracy difference.
Overlap and limits
The real-weight error measures implementation accuracy against the dequantized
packed-weight oracle; it does not measure BF16-to-FP8 quantization error or
model quality. GSM8K is the model-quality gate.
This projection is upstream of #50654's convolution/recurrent/gated-norm
fusion and is complementary to it. #50659's PR-specific implementation is
NVIDIA-only.
Tool assistance
OpenAI Codex assisted with implementation, tests, benchmarking, and drafting
this description.