mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #744] [CLOSED] HIP: on-device autotuning for gfx1100 decode (kernel shapes, draft and CPU settings) #2799
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#2799
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/744
Author: @xyzzing
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:hip-decode-autotune📝 Commits (10+)
9ef55a4Merge branch 'pr-14'ca1758dMerge pull request #14: CPU pool: fix dangling else in Linux physical_cores() (#14, fixes #13 and #11)0cf01f5Merge pull request #9: CPU pool: sleep between requests instead of spinning (#9, fixes #4)6d2b450Merge pull request #7: serve: fix zero-token replies from the engine-queue race between requests (#7)54cf7b6Merge pull request #10: Conversation cache + short prompt parts through the decode windows (#8, #10)65163f6setup: require engine v0.1.3 (conversation cache, idle CPU fix, Linux pool fix)11bb7e2setup: update an old ready-made engine when an existing install starts36215b9IQ3_S support: the GSQ-RCO IQ3_S model (engine 0.1.4)6c4c8c1setup: require engine v0.1.4 (IQ3_S)a40fe52serve: treat unset/-1 max_tokens as remaining context, not 1024📊 Changes
15 files changed (+1911 additions, -92 deletions)
View changed files
📝
CMakeLists.txt(+10 -0)📝
docs/AMD_HIP.md(+1 -1)➕
docs/AMD_HIP_AUTOTUNE.md(+92 -0)➕
include/strata/kernels/decode_tuning.hpp(+89 -0)📝
include/strata/kernels/iq_kernels.hpp(+12 -0)📝
setup.py(+27 -11)📝
src/kernels/cuda/iq_kernels.cu(+208 -47)➕
src/kernels/decode_tuning.cpp(+160 -0)📝
src/program/generate.cpp(+4 -0)➕
tests/core/decode_tuning_test.cpp(+87 -0)📝
tools/calibrate.py(+130 -33)➕
tools/hip/autotune.py(+321 -0)➕
tools/hip/test_autotune.py(+146 -0)➕
tools/hip/tune_decode.cpp(+504 -0)📝
tools/test_calibrate.py(+120 -0)📄 Description
Summary
On-device decode autotuning for the AMD HIP backend (gfx1100): per-shape rows-per-block tuning for the decode expert kernels and
iq_mmvq(bitwise-exact variants only), a guarded tuning-table format, an on-device tuner, and an orchestrator that sweeps kernels, draft floor, CPU workers, and drafting windows with the user's own prompts. Settings-layer sweeps (--spec,--suffix-draft,--spec-min-p, workers) now work on HIP too, andcalibrateis HIP-aware (keeps the config's--pcie-frac).Both layers keep answers exactly the same: kernel variants are byte-compared on-device and end-to-end; the settings layer is greedy-verification-exact.
Measured on the target hardware (RX 7900 XTX 24 GB, IQ3_S, ROCm 7.1.1)
--spec-min-p 0.70= 63.1 tok/s vs baseline (~+10%), token-identity verified end-to-end — adopted in our serving config.strata-<model>.autotune.json) carries every measurement.Notes
4da9c59); a rebase onto current upstream main is queued (the files the patch touches are untouched by 0.1.36–0.1.38's kernel changes, so the rebase should be mechanical).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.