mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1167] [CLOSED] hip: a rocBLAS solution table for the FP16 prompt GEMMs on gfx103x (the GDN projection 7x below 1,152 tokens; short prompts -10 to -14%) #3281
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#3281
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/1167
Author: @Vop3p
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v140/hip-rocblas-tuning📝 Commits (2)
2278ccehip: a rocBLAS solution table for the FP16 prompt GEMMs on gfx103x (the GDN projection 7x below 1,152 tokens; short prompts -10 to -14%)db64983rocBLAS table docs: the shipped gfx1030 table was measured on an RX 6900 XT; other gfx1030 cards can make their own with tune_rocblas (reports welcome)📊 Changes
14 files changed (+1309 additions, -6 deletions)
View changed files
📝
CMakeLists.txt(+20 -0)➕
bench/results/2026-10-05-rdna2-rocblas-table/README.md(+80 -0)➕
bench/results/2026-10-05-rdna2-rocblas-table/timing-off.txt(+9 -0)➕
bench/results/2026-10-05-rdna2-rocblas-table/timing-on.txt(+9 -0)➕
bench/results/2026-10-05-rdna2-rocblas-table/tune-summary.txt(+226 -0)📝
cmake/hip_backend.cmake(+9 -0)📝
docs/AMD_HIP.md(+53 -1)📝
include/strata/prefill/gemm.hpp(+1 -0)📝
setup.py(+9 -1)📝
src/prefill/gemm.cu(+160 -4)➕
src/prefill/rocblas_tuning.hpp(+129 -0)➕
tests/hip/prefill_rocblas_gemm.cpp(+206 -0)➕
tools/hip/gfx1030-rocblas-5.6.0.8d1ae90e.txt(+117 -0)➕
tools/hip/tune_rocblas.cpp(+281 -0)📄 Description
Re-filed from #981 (closed with the history rewrite) as the one commit on top of #835, which is in 0.1.40.1. The table serves the
STRATA_HIP_PROMPT_F16=1route; with it off nothing runs through it. Inf16_inplacethe table's kernel is tried first,cublasGemmExotherwise, and the review'sSTRATA_DBG_NANcount follows either. The tool (tools/hip/tune_rocblas), the table format and the engine route are described in #981; the table file is the one measured there (tools/hip/gfx1030-rocblas-5.6.0.8d1ae90e.txt).Measured on 0.1.40.1 (
82f46a8+ this commit; RX 6900 XT, one card, ROCm 10.0.0 / rocBLAS 5.6.0.8d1ae90e;STRATA_HIP_PROMPT_F16=1 STRATA_SH_STREAM=1,--kv int8 --kv-resident 32768 --max-context 131072 --spec 4; the #884 GFXOFF workaround in place, which does not change speed):hip_prefill_rocblas_gemm(ctest,STRATA_ROCBLAS_TUNING=tools/hip): PASS -rocBLAS tuning enabled (112 rows, 76 with a solution, gfx1030, rocBLAS 5.6.0.8d1ae90e), 4 cases within FP16 rounding of hipBLASEx,tuned_launches=4 fallbacks=0. On 0.1.40.1 the test needsSTRATA_HIP_PROMPT_F16=1as well, since the FP16 route is opt-in now; without it the test skips.max_tokens8, temperature 0: 12 pairs per length, the same slice in each pair. Prompt read speed from the engine's own line:--short-read 640the prompt is read token by token, no prompt GEMMsDecode is not touched (the table serves the prompt GEMMs only). The engine logs
rocBLAS tuning enabled (...)when the table is read, so an arm's state is visible in its log.Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.