← Back to Pull requests

feat(hipblaslt): W4A16 gfx1150 prefill kernels selected by Origami #16276

Closed
unknown closed this pull request without merging on Nov 24, 2026 15:51 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 21:05 UTC
Author

ISSUE ID #16221

Motivation

hipBLASLt has no W4A16 kernels for gfx1150 (Strix Point), and Origami's W4A16 model and Stream-K grid rule only apply to gfx1151. This PR brings the gfx1151 W4A16 prefill set of #16229 to gfx1150.

  • 1.72x faster than vLLM's W4A16 kernels on the prefill problems of a vLLM profile (geomean, 180 problems; 1.85x weighted by the profile's time). hipBLASLt is faster on all 180.
  • Depends on #16229; based on its branch. One commit.

    Technical Details

  • Kernels: the 134 gfx1151 W4A16 prefill kernels and their 8 Origami logic files retargeted to gfx1150 (same ISA; every kernel fits gfx1150's VGPR file). In the bf16 symmetric Signed set, 4 tiles use a variant with wider A reads. Every entry declares the CUOccupancy the gfx11 rule gives for its kernel on gfx1150, which is lower than on gfx1151 (a third less VGPR file).

  • Origami: is_w4a16(problem, hardware) now holds on gfx1150 too, with the same constants. The two architectures run the same kernels on the same ISA, so no constant of the W4A16 model is per architecture. What differs comes from hardware_t (16 CUs, and no MALL, so tiles are not shared over the workgroups) and from each kernel's CUOccupancy.

  • SK_FIXUP_CYCLES_PER_ELEM is the one shared constant that depends on the memory system (it prices reading the Stream-K partials, which gfx1151 holds in its MALL). It was fitted on gfx1151. gfx1150 takes the same value because its picks do not depend on it: sweeping it from 0 to twice its value changes no pick on 632 measured problems. The comment on the constant says so.

  • Hardware constants: the gfx1150 values this relies on (2 matrix units per CU and the fitted mem3 0.0300383) came with #15687, already on develop. An earlier version of this PR carried them in a commit of its own.

  • No heuristics database entries: heuristics.cpp is unchanged.

  • hipblaslt.h: the padding and 8 MiB workspace note of the W4A16 scale modes covers gfx1150 too.
  • Test Plan

  • Performance on gfx1150 (two boards): GPU kernel time of hipBLASLt's own pick, 50 iterations after 50 warm-up. Only the weight rows are padded (odd multiple of 128 bytes). The boards give two speeds between processes, so each side takes its fastest process.

  • Against vLLM: the W4A16 prefill problems of a vLLM profile on gfx1150 (180), vLLM's time per call taken from the profile as it is, with vLLM's own layout.

  • Correctness: hipblaslt-bench -v of hipBLASLt's own pick on gfx1150. The client tests run on gfx1150 from #16341 on.

  • Unit tests: Origami ctest; TensileLite custom-kernel tests (test_custom_kernel_occupancy.py checks gfx1150 as it does gfx1151).

  • No PR lane runs on gfx1150 (TheRock tests it nightly only); the numbers below are from manual runs.
  • Test Result

  • Correctness: at the tip of the stack, the sizes of the W4A16 YAML cases pass on gfx1150: 432 of 432 (54 sizes × 8 types), worst normalized error 3.2e-3 for bf16 and 7.1e-5 for fp16. An earlier state of the stack passed 2,024 of 2,024 picks (8 types × 253 shapes).

  • Unit tests: Origami 145 test cases pass (test_gemm 87, test_streamk 19, test_origami 39); TensileLite custom-kernel tests 1871 pass, 3 skipped.

  • Against vLLM (prefill, vLLM time / hipBLASLt time):
  • | | problems | geomean | weighted by profile time |
    |---|---|---|---|
    | all | 180 | 1.72x | 1.85x |
    | bf16 symmetric | 33 | 2.05x | 2.12x |
    | bf16 zero-point | 11 | 2.25x | 2.20x |
    | fp16 symmetric | 18 | 1.60x | 1.58x |
    | fp16 zero-point | 118 | 1.61x | 1.77x |
    | M ≤ 128 | 44 | 2.03x | 2.50x |
    | M 129-800 | 90 | 1.60x | 1.73x |
    | M ≥ 801 | 46 | 1.68x | 1.54x |

    The lowest is 1.10x (89×3584×3584 fp16 symmetric).

  • Model changes since the first version of this PR, each measured on hardware as hipBLASLt's own pick:

  • - Common constants instead of per-architecture ones: 0.995x the time on the kernels timed one by one (95% CI 0.991-0.998, 632 problems) and 1.000x end to end (1,012 cases).
    - CUOccupancy read per CU (#16229): 0.992x on the prefill calibration shapes (95% CI 0.988-0.996, 632 cases) and 0.995x on the vLLM prefill problems. Of the 13 vLLM problems whose kernel changes, 5 are more than 5% faster and 5 more than 5% slower; the slowest are 89×3584×18944 (+18%) and 89×3584×3584 (+15%), both still ahead of vLLM.
    - One builder of the Origami config for ranking and launch (#16229): no pick changes on 1,012 cases, 1.000x.
  • Earlier validation. The first version of this PR reached a median 69.0% of the roofline (78.3 GiB/s measured on these boards, 17.2 TFLOPS) on 202 problems, with every operand padded. That figure was not re-measured.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Risk level

    Low. The kernels and the W4A16 model only affect W4A16 on gfx1150; gfx1151's picks do not change.

    🤖 Generated with Claude Code

    Diff: 633 lines (+474 / -159) across 7 files Reviewer: yzhang93 Review duration: 8326m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 633 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.386
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #16276"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.4% (MEDIUM) · Higher = larger blast radius
    55.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.9% · Safe to merge
    21.9%