feat(hipblaslt): W4A16 gfx1150 decode kernels selected by Origami #16341
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.57) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #16341"
general
weight: 0.35
yzhang93
ISSUE ID #16340
Motivation
On gfx1150, W4A16 decode GEMMs (1 to 5 tokens) run on the prefill tiles, which read the weights through LDS in multi-wave workgroups sized for many tokens. #16249 gives gfx1151 decode kernels that stream the int4 weights once at DRAM bandwidth, and an Origami model that ranks them. This PR brings both to gfx1150.
wvSplitK_int4_g: 1.01x geomean over 86 problems, 1.02x weighted by the profile's time.Depends on #16249, which is stacked on #16276 and #16229; based on #16249's branch. One commit.
Technical details
Kernels. The 70 gfx1151 dot2 WaveSplitK decode kernels retargeted to gfx1150,
*_MT<m0>x<m1>x<du>_Dot2_gfx1150, 35 per int4 encoding:| Type | Kernels |
|---|---|
| bf16 symmetric | 7 |
| bf16 zero-point | 10 |
| fp16 symmetric | 8 |
| fp16 zero-point | 10 |
Origami.
w4a16_decode_dram_bytes_per_usreturns gfx1150's DRAM bandwidth, 84.1 GB/s,[MEASURED]on these boards, which turns the decode model on there. Nothing else is per architecture: the model and its two cycle constants are the ones of #16249. A TODO (AIESW-51613) records that the two bandwidths should come fromhardware_t, whose DRAM values are wrong today (about 623 GB/s on gfx1151 and 31 GB/s on gfx1150) and are what the tile model is calibrated against.Kernel set on gfx1150. The set was selected on gfx1151. On gfx1150, every kernel of the set was timed in its own process on 380 cases (95 shapes of 1-5 tokens × 4 types):
MT1x3x2048is the fastest kernel on 26 of its 48 cases; without it they would be 10% slower on average. It stays.MT1x4x2048(fp16 symmetric) is the one kernel that could go: without it its 13 cases would be 0.1% slower. It stays so that both architectures ship the same set.Hold-out of the two cycle constants. They were fitted on gfx1151, on canonical shapes. Choosing them on half of the (N, K) layers of the 380 gfx1150 cases and scoring the pick on the other half (200 random splits) gives 1.020 against the fastest kernel; the shipped values give 1.015 on the same held-out halves, and are the best of the grid tried on all 380 cases.
Test plan
matmul_w4a16cases ofmatmul_gtest.yamlselect gfx1150 and gfx1151, and thew4a16_layout_gtest.cppfixture no longer skips gfx1150. That covers the tests of #16229 and #16249 (K remainders, incomplete scale groups, unserved K, batch) and the ones that were already on develop, which had never run on gfx1150.Test result
w4a16_layout_gtest.cpppass. They were run by hand against this stack's library with a stand-in for gtest, so CI is their first real run. The eleventh,scalar_b_has_no_matching_kernel(already on develop), needs a plain fp16 kernel and could not be checked: the library built for these runs holds only the W4A16 logic. The gfx1150 logic it needs is on develop since #15687.hipblaslt-bench -von the sizes of the W4A16 YAML cases: 432 of 432 pass (54 sizes × 8 types), worst normalized error 3.2e-3 for bf16 and 7.1e-5 for fp16; the 360 cases of 1-5 tokens all run a decode kernel.test_gemm90,test_streamk19,test_origami39); TensileLite custom-kernel tests 2219 pass, 3 skipped.| | problems | geomean | weighted by profile time | hipBLASLt faster |
|---|---|---|---|---|
| all | 86 | 1.01x | 1.02x | 53 |
| bf16 symmetric | 23 | 1.00x | 1.01x | 12 |
| bf16 zero-point | 4 | 0.98x | 0.98x | 0 |
| fp16 symmetric | 12 | 1.01x | 1.01x | 8 |
| fp16 zero-point | 47 | 1.02x | 1.04x | 33 |
17 problems are more than 2% slower than vLLM, 10 more than 5% and 5 more than 10%. The lowest are 1×9728×896 (0.89x), 1×896×4864 (0.89x) and 1×2048×6144 (0.90x), all fp16 zero-point.
Submission checklist
Risk level
Low. The kernels only serve W4A16 problems of 1 to 5 tokens on gfx1150. gfx1151 is not affected, except that its W4A16 client tests now share their cases with gfx1150.
🤖 Generated with Claude Code