feat(hipblaslt): W4A16 gfx1151 prefill kernels selected by Origami #15736
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 #15736"
general
weight: 0.35
yzhang93
ISSUE ID #15737
Motivation
<!-- Explain the purpose of this PR and the goals it aims to achieve. -->
On gfx1151 (Strix Halo), each W4A16 type (int4 weights with block scales, bf16/fp16 activations) had a single prefill kernel (MT64x160), far from the hardware roofline on most shapes. This PR adds a set of Stream-K kernels per type and lets Origami pick the kernel and its launch grid.
Technical Details
<!-- Explain the changes along with any relevant GitHub links. -->
Everything below applies only to W4A16 (int4 A with block scales) on gfx1151.
grid_k_split_aware_gfx1151_w4a16). Constants live inw4a16_defaults_tand are only used on gfx1151.Int4maps to Origami's data type; gfx11 W4A16 custom kernels get their real occupancy; the Stream-K launch grid gets the kernel's wave layout, as Origami ranks it.Kernels
| type | tiles (× Signed, UnsignedBias8) | MT0 (weight rows) | MT1 (tokens) |
|---|---|---|---|
| bf16 symmetric | 19 | 32-256 | 16-256 |
| bf16 zero-point | 15 | 32-160 | 16-256 |
| fp16 symmetric | 16 | 32-256 | 16-256 |
| fp16 zero-point | 17 | 32-160 | 16-256 |
How they were chosen:
1. Per tile: TensileLite parameters searched on the tile's ideal problem (M = MT1, a whole number of tiles per CU, K = 4096). On it the kernels reach 81-87% of roofline (median per type).
2. Set: each type keeps the tiles that give the best time over the shape lists when Origami picks the kernel. Origami's constants are calibrated on hipBLASLt kernel times of these kernels.
Test Plan
<!-- Explain any relevant testing done to verify this PR. -->
hipblaslt-bench -v, 8 types, every output element.--algo_method index) and compared with the pick.tools/roofline).test_custom_kernel_occupancy.py,test_custom_kernel_staggeru_metadata.py;PredictionLibraryTest.Int4MapsToOrigamiInt4.Test Result
<!-- Briefly summarize test outcomes. -->
| | problems | median | ≥ 80% |
|---|---|---|---|
| all | 5152 | 84.9 | 64% |
| bf16 symmetric | 1288 | 84.7 | 62% |
| bf16 zero-point | 1288 | 83.3 | 59% |
| fp16 symmetric | 1288 | 87.0 | 70% |
| fp16 zero-point | 1288 | 85.0 | 64% |
| M ≤ 48 | 840 | 72.7 | 29% |
| M 49-128 | 892 | 73.9 | 29% |
| M 129-800 | 1864 | 85.8 | 71% |
| M ≥ 801 | 1556 | 90.8 | 94% |
| M multiple of 16 | 4328 | 86.2 | 66% |
| M not a multiple of 16 | 824 | 80.3 | 51% |
| layers of other models | 384 | 82.0 | 56% |
<details>
<summary>By type and M, and by group</summary>
| type | M ≤ 48 | M 49-128 | M 129-800 | M ≥ 801 | G32 | G128 |
|---|---|---|---|---|---|---|
| bf16 symmetric | 69.7 | 71.2 | 86.3 | 90.5 | 85.0 | 84.1 |
| bf16 zero-point | 71.5 | 70.7 | 82.6 | 89.7 | 83.5 | 82.6 |
| fp16 symmetric | 74.8 | 79.7 | 87.8 | 94.0 | 87.0 | 87.0 |
| fp16 zero-point | 74.4 | 74.6 | 86.3 | 90.4 | 85.4 | 84.6 |
</details>
Submission Checklist