mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #339] [CLOSED] hip: hipBLASLt tuning table for gfx1201 (R9700) with ROCm 10.2.0a nightly (hipBLASLt 1.5.0) #2586
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2586
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/339
Author: @bsorensen110
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:gfx1201-hipblaslt-100500📝 Commits (5)
f7d0be9hip: hipBLASLt tuning table for gfx1201 (Radeon AI PRO R9700) with ROCm 10.2.0a nightly (hipBLASLt 1.5.0)ca94d37hip: encode the BF16 fixtures of the hipBLASLt tuner and parity test with bf16_from_f32()7af2ef6Update AMD HIP documentation for hipBLASLt 1.5.03c0e1eehip: address review of the gfx1201 table: current docs, smoke-test wording8a4d331Merge origin/main (v0.1.31) into gfx1201-hipblaslt-100500📊 Changes
4 files changed (+70 additions, -10 deletions)
View changed files
📝
docs/AMD_HIP.md(+19 -3)📝
tests/hip/prefill_hipblaslt_gemm.cpp(+15 -6)➕
tools/hip/gfx1201-hipblaslt-100500.txt(+34 -0)📝
tools/hip/tune_hipblaslt.cpp(+2 -1)📄 Description
What
Commits: (1) Adds
tools/hip/gfx1201-hipblaslt-100500.txt, a hipBLASLt tuning table for the Radeon AI PRO R9700 (gfx1201, 32 GB) with ROCm 10.2.0a20260914 (AMD'sgfx120X-allnightly, hipBLASLt 1.5.0, library buildd3164197), plus a short "Shipped tables" list indocs/AMD_HIP.md. (2) A 4-line fix to how the tuner and the parity test encode BF16 fixtures (see Caveats; the table's BF16 rows depend on it). (3) Review follow-up: the stale "no gfx1201 table" note indocs/AMD_HIP.mdis updated, and the test's comments and messages say it is a smoke test over two rows (behaviour and exit codes unchanged).The table is for the engine's prompt GEMMs (dense bf16/f16). Setup chooses
tools/hip/<arch>-hipblaslt-<version>.txtby the installed hipBLASLt version, and the engine refuses any other version, so it does not interfere with a table for another version. (#262'sgfx1201-hipblaslt-100401.txt, hipBLASLt 1.4.1, was not merged when #262 closed; I use it below only as the example of a table that 1.5.0 rejects.)Why it is needed
With hipBLASLt 1.5.0, #262's table is rejected and the engine falls back to hipBLASEx (
prefill gemm: hipBLASLt version mismatch: file=100401 runtime=100500; using hipBLASExin the engine log; the parity test printstuning table rejectedand exits 1). Solution ids are not stable across versions: on the 24 shapes both tables cover, only 13 of the 24 chosen ids are the same.Contents
tune_hipblasltas shipped (16 heuristic candidates per row, 32 MiB workspace, two warmups, three timing repetitions; a candidate must be finite, relative L2 <= 1e-4, max abs <= 1e-2, with no padding writes).Evidence
On a clean checkout of
main(30ec18e) plus this PR, built for gfx1201 with ROCm 10.2.0a (re-run on the head8a4d331, which merges v0.1.319259cad: the same 4/4 PASS,fallbacks=0, and the same rejection of the 100401 table):STRATA_HIPBLASLT_TUNING=tools/hip/gfx1201-hipblaslt-100500.txt hip_prefill_hipblaslt_gemm:tuning enabled (32 rows, gfx1201, version 100500), 4/4 cases PASS, exit 0 (relative L2 <= 1.3e-6 for f16, 3.6e-7 for bf16 at T=37; the T=4096 bf16 case is exactly 0).tuning table rejected: hipBLASLt version mismatch: file=100401 runtime=100500, exit 1.setup.hipblaslt_table('gfx1201', ['/opt/rocm/lib'])returns the new file.--prefill auto): the engine log showstuning enabled (32 rows, gfx1201, version 100500)on every start since, and a calibration run recorded 16,480 hipBLASLt launches with zero fallbacks across all 16 geometries.What it is worth
Small: on fresh 4,210-token prompts, 1,590 tok/s tuned vs 1,531 untuned (+3.9%), on one card. It does not change decode. I would not describe it as more than a modest prompt-GEMM gain, and I did not re-measure it on longer prompts, where other phases dominate.
Caveats
100500) is all the engine can check. A different 1.5.0 build (another nightly) could number its solutions differently.hip_prefill_hipblaslt_gemmis a smoke test, not a validator: it refuses a table for another architecture or version and compares two of the 32 rows with hipBLASEx. A solution id the library rejects makes the engine fall back to hipBLASEx and the test still passes (I checked: with those two rows set to an invalid id the test exits 0 andSTRATA_HIPBLASLT_VERBOSE=1printslaunches=0 fallbacks=4; with the shipped table it printslaunches=4 fallbacks=0). The docs say to read that summary line and to recalibrate withtune_hipblasltfor another 1.5.0 build.mainthe T=37 beta=1 BF16 case printsrelative_l2=0 max_abs=0, with the fix it printsrelative_l2=3.6e-07 max_abs=2.6e-06(the T=4096 BF16 case prints 0 either way, and the f16 cases are unchanged). So the stock BF16 inputs differ from the intended ones; the exact fault is inferred. The commit changes only the two helper files (tests/hip/prefill_hipblaslt_gemm.cpp,tools/hip/tune_hipblaslt.cpp, 4 lines), not the engine and not the f16 path; it is in this PR because anyone regenerating a table with the stock tuner would calibrate the BF16 rows on those inputs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.