[PR #3924] [CLOSED] [Engine] rocBLAS table for gfx1030 with rocBLAS 5.2.0 (Arch Linux ROCm 7.2.4): prompts below 1,152 tokens 12-18% faster #4835

Closed
opened 2026-11-07 15:39:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3924
Author: @schmittcn
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: pr/gfx1030-rocblas-rocm72


📝 Commits (5)

  • 2788a78 tools/hip: gfx1030 rocBLAS table for ROCm 7.2.4 (Arch, rocBLAS 5.2.0.dabb6df2b98-dirty)
  • 8b11b58 bench: gfx1030 rocBLAS table for ROCm 7.2.4 (Arch), A/B on RX 6900 XT: prompts below 1,152 tokens -12 to -18%, 11K -4 to -9%
  • b02ab6c docs: AMD_HIP.md names the ROCm 7.2.4 (Arch) gfx1030 rocBLAS table
  • 5cfa15b Merge remote-tracking branch 'upstream/main' into pr/gfx1030-rocblas-rocm72
  • 354bded [Docs] rocBLAS table: exact version string, directory setting, no end-to-end gain on a layer split

📊 Changes

13 files changed (+1564 additions, -1 deletions)

View changed files

➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/README.md (+83 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/answers-off.txt (+12 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/answers-on.txt (+12 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/config-on.json (+58 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run1.txt (+24 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run2.txt (+24 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run3.txt (+24 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run1.txt (+28 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run2.txt (+28 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run3.txt (+28 -0)
➕ bench/results/2026-10-24-rdna2-rocblas-table-rocm72/tune-summary.txt (+1122 -0)
📝 docs/AMD_HIP.md (+5 -1)
➕ tools/hip/gfx1030-rocblas-5.2.0.dabb6df2b98-dirty.txt (+116 -0)

📄 Description

Problem and result

The rocBLAS tables in tools/hip cover gfx1030 with rocBLAS 5.6.0.8d1ae90e (ROCm 10.0.0). #3343 adds 5.4.0.ad84daa81c
(TheRock 7.13). Arch Linux packages ROCm 7.2.4 (rocblas 7.2.4-3). Its rocBLAS reports 5.2.0.dabb6df2b98-dirty, so
an engine built against the system ROCm on Arch finds no table for its build and runs rocBLAS's default kernels.

This PR adds that table. It was made with tools/hip/tune_rocblas on an RX 6900 XT against that rocBLAS, and
docs/AMD_HIP.md now names it. With it, prompts below 1,152 tokens read 12-18% faster on the GPU timeline. Prompts of
1.3K-1.5K tokens read 2-4% faster, and prompts of 11K-12K tokens 4-9% faster. No code changes: setup already points
STRATA_ROCBLAS_TUNING at tools/hip on gfx103x, and the engine takes the file of its own build.

#3343, the same kind of table for TheRock's rocBLAS 5.4.0. This PR is independent of it, and the two files do not
overlap. #981 is the table mechanism.

Approach

LD_LIBRARY_PATH=/opt/rocm/lib build-hip/tune_rocblas --tuning-out tools/hip/gfx1030-rocblas-5.2.0.dabb6df2b98-dirty.txt
with the defaults. It wrote 112 rows: 78 with a solution, 34 default. Each solution it kept matched the default
kernel's output (relative L2 about 2e-5, no padding writes). The full tuner output, the raw timing lines, the answers
and the sanitized config are in bench/results/2026-10-24-rdna2-rocblas-table-rocm72/. The measurement follows the
method of bench/results/2026-10-05-rdna2-rocblas-table.

Validation

Environment:

  • RX 6900 XT 16 GB (gfx1030), PCIe 4.0 x16, Ryzen 9 5950X, 64 GB, Arch Linux, kernel 7.2.8.
  • ROCm 7.2.4 from Arch's packages, lib_dirs /opt/rocm/lib.
  • Engine 0.1.48.1, a HIP build of 7ddc17a3. Its only local changes are in src/qwen35, which the measured model does
    not use.
  • Model: Qwen3.8-Flash-Next GSQ-RCO Coder IQ1_M, with setup's config of this PC (--adapt-every 100000 in both arms).

Passed:

  • A/B on the GPU timeline: one server per arm, the same binary. The only difference is STRATA_ROCBLAS_TUNING
    (unset or tools/hip). Each arm got 12 prompts (685-12,164 tokens), each from its own offset of
    docs/DETAILS.md, with temperature 0 and max_tokens 8. Each arm ran three times as a fresh server. The GPU
    timeline comes from strata prefill timing. Mean change:
    • 685 / 776 / 977 / 985 / 1,084 tokens: -16.4 / -12.9 / -18.0 / -15.3 / -12.1%.
    • 1,264 / 1,353 / 1,510 / 1,543 tokens: -1.6 / -3.6 / -3.7 / -1.9%.
    • 10,917 / 11,396 / 12,164 tokens: -7.6 / -8.6 / -4.2%.
    • The runs are in the report's table. The largest spread within one arm is about 200 ms.
  • Solutions used: the engine log shows the table taken (rocBLAS tuning enabled (112 rows, 78 with a solution, gfx1030, rocBLAS 5.2.0.dabb6df2b98-dirty)). Each on-arm run reports tuned_launches=6268 fallbacks=0.
  • Determinism: each arm gives the same 12 answers when repeated (runs 2 and 3 compared).

Failed:

  • Answers between the arms: 11 of 12 are the same. One (1,089 tokens) differs at its 6th reasoning token,
    "request:" against "request.". This is the FP16 rounding of a different kernel; #981's report saw identical answers
    on its four prompts.

Not run:

  • Other gfx103x cards (gfx1031 / gfx1032).
  • Other distributions' ROCm 7.2.4 builds, which may report another rocBLAS version string. The engine then refuses the
    table and says so in its log.
  • Decode, which does not use these GEMMs.

Limits

One machine, one model. The table is valid for this one rocBLAS build only.

  • Measured on one card, where these dense FP16 GEMMs are the prompt path. On a two-card layer split with AMD's
    Ubuntu ROCm 7.2.4, a table of this kind loaded and was used but made no end-to-end difference at 4K and 16K
    prompts (expert streaming and the hand-off dominate there; see the comment by @DylanFromMassey).
  • AMD's Ubuntu packages of the same ROCm 7.2.4 report 5.2.0.dabb6df2b9, so this file does not load there; that
    build needs its own table. docs/AMD_HIP.md now says so and recommends pointing STRATA_ROCBLAS_TUNING at the
    directory (setup's default) so each GPU of a split takes its own file.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3924 **Author:** [@schmittcn](https://github.com/schmittcn) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/gfx1030-rocblas-rocm72` --- ### 📝 Commits (5) - [`2788a78`](https://github.com/Niko1221/Strata/commit/2788a780d0076cbe28640e456a6e24a71d4d41e5) tools/hip: gfx1030 rocBLAS table for ROCm 7.2.4 (Arch, rocBLAS 5.2.0.dabb6df2b98-dirty) - [`8b11b58`](https://github.com/Niko1221/Strata/commit/8b11b587b521c2e5caeef31ef39adde8a42cd612) bench: gfx1030 rocBLAS table for ROCm 7.2.4 (Arch), A/B on RX 6900 XT: prompts below 1,152 tokens -12 to -18%, 11K -4 to -9% - [`b02ab6c`](https://github.com/Niko1221/Strata/commit/b02ab6c563863fd9039f4947ce99b4a720e6be0d) docs: AMD_HIP.md names the ROCm 7.2.4 (Arch) gfx1030 rocBLAS table - [`5cfa15b`](https://github.com/Niko1221/Strata/commit/5cfa15bdd8537ea277bad548fbacbda2a60c0389) Merge remote-tracking branch 'upstream/main' into pr/gfx1030-rocblas-rocm72 - [`354bded`](https://github.com/Niko1221/Strata/commit/354bdedbe9eea72de5e010aa9ed7133661245170) [Docs] rocBLAS table: exact version string, directory setting, no end-to-end gain on a layer split ### 📊 Changes **13 files changed** (+1564 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/README.md` (+83 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/answers-off.txt` (+12 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/answers-on.txt` (+12 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/config-on.json` (+58 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run1.txt` (+24 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run2.txt` (+24 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-off-run3.txt` (+24 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run1.txt` (+28 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run2.txt` (+28 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/timing-on-run3.txt` (+28 -0) ➕ `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/tune-summary.txt` (+1122 -0) 📝 `docs/AMD_HIP.md` (+5 -1) ➕ `tools/hip/gfx1030-rocblas-5.2.0.dabb6df2b98-dirty.txt` (+116 -0) </details> ### 📄 Description ## Problem and result The rocBLAS tables in `tools/hip` cover gfx1030 with rocBLAS 5.6.0.8d1ae90e (ROCm 10.0.0). #3343 adds 5.4.0.ad84daa81c (TheRock 7.13). Arch Linux packages ROCm 7.2.4 (`rocblas 7.2.4-3`). Its rocBLAS reports `5.2.0.dabb6df2b98-dirty`, so an engine built against the system ROCm on Arch finds no table for its build and runs rocBLAS's default kernels. This PR adds that table. It was made with `tools/hip/tune_rocblas` on an RX 6900 XT against that rocBLAS, and docs/AMD_HIP.md now names it. With it, prompts below 1,152 tokens read 12-18% faster on the GPU timeline. Prompts of 1.3K-1.5K tokens read 2-4% faster, and prompts of 11K-12K tokens 4-9% faster. No code changes: setup already points `STRATA_ROCBLAS_TUNING` at `tools/hip` on gfx103x, and the engine takes the file of its own build. ## Related discussion #3343, the same kind of table for TheRock's rocBLAS 5.4.0. This PR is independent of it, and the two files do not overlap. #981 is the table mechanism. ## Approach `LD_LIBRARY_PATH=/opt/rocm/lib build-hip/tune_rocblas --tuning-out tools/hip/gfx1030-rocblas-5.2.0.dabb6df2b98-dirty.txt` with the defaults. It wrote 112 rows: 78 with a solution, 34 `default`. Each solution it kept matched the default kernel's output (relative L2 about 2e-5, no padding writes). The full tuner output, the raw timing lines, the answers and the sanitized config are in `bench/results/2026-10-24-rdna2-rocblas-table-rocm72/`. The measurement follows the method of `bench/results/2026-10-05-rdna2-rocblas-table`. ## Validation Environment: - RX 6900 XT 16 GB (gfx1030), PCIe 4.0 x16, Ryzen 9 5950X, 64 GB, Arch Linux, kernel 7.2.8. - ROCm 7.2.4 from Arch's packages, `lib_dirs` `/opt/rocm/lib`. - Engine 0.1.48.1, a HIP build of `7ddc17a3`. Its only local changes are in `src/qwen35`, which the measured model does not use. - Model: Qwen3.8-Flash-Next GSQ-RCO Coder IQ1_M, with setup's config of this PC (`--adapt-every 100000` in both arms). **Passed:** - **A/B on the GPU timeline:** one server per arm, the same binary. The only difference is `STRATA_ROCBLAS_TUNING` (unset or `tools/hip`). Each arm got 12 prompts (685-12,164 tokens), each from its own offset of `docs/DETAILS.md`, with temperature 0 and `max_tokens` 8. Each arm ran three times as a fresh server. The GPU timeline comes from `strata prefill timing`. Mean change: - 685 / 776 / 977 / 985 / 1,084 tokens: -16.4 / -12.9 / -18.0 / -15.3 / -12.1%. - 1,264 / 1,353 / 1,510 / 1,543 tokens: -1.6 / -3.6 / -3.7 / -1.9%. - 10,917 / 11,396 / 12,164 tokens: -7.6 / -8.6 / -4.2%. - The runs are in the report's table. The largest spread within one arm is about 200 ms. - **Solutions used:** the engine log shows the table taken (`rocBLAS tuning enabled (112 rows, 78 with a solution, gfx1030, rocBLAS 5.2.0.dabb6df2b98-dirty)`). Each on-arm run reports `tuned_launches=6268 fallbacks=0`. - **Determinism:** each arm gives the same 12 answers when repeated (runs 2 and 3 compared). **Failed:** - Answers between the arms: 11 of 12 are the same. One (1,089 tokens) differs at its 6th reasoning token, "request:" against "request.". This is the FP16 rounding of a different kernel; #981's report saw identical answers on its four prompts. **Not run:** - Other gfx103x cards (gfx1031 / gfx1032). - Other distributions' ROCm 7.2.4 builds, which may report another rocBLAS version string. The engine then refuses the table and says so in its log. - Decode, which does not use these GEMMs. ## Limits One machine, one model. The table is valid for this one rocBLAS build only. - Measured on one card, where these dense FP16 GEMMs are the prompt path. On a two-card layer split with AMD's Ubuntu ROCm 7.2.4, a table of this kind loaded and was used but made no end-to-end difference at 4K and 16K prompts (expert streaming and the hand-off dominate there; see the comment by @DylanFromMassey). - AMD's Ubuntu packages of the same ROCm 7.2.4 report `5.2.0.dabb6df2b9`, so this file does not load there; that build needs its own table. docs/AMD_HIP.md now says so and recommends pointing `STRATA_ROCBLAS_TUNING` at the directory (setup's default) so each GPU of a split takes its own file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:39:23 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4835
No description provided.