mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#2869
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/849
Author: @Vop3p
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:hip-gfx103x-qsa-attn📝 Commits (10+)
749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)📊 Changes
3 files changed (+159 additions, -2 deletions)
View changed files
➕
bench/results/2026-10-04-rdna2-pre75-attention/README.md(+116 -0)➕
bench/results/2026-10-04-rdna2-pre75-attention/strata-1gpu.json(+40 -0)📝
docs/OLDER_GPUS.md(+3 -2)📄 Description
Summary
attn_chunk_kernel_pre75(PR #540, bit for bit the default attention kernel) is built only into the experimental CUDAbuild and run below sm_75. On HIP the default kernel runs, whose score loop is bound by the LDS pipe on gfx1030: its
12 heads × 5
__shfl_xor_syncper cell all compile tods_bpermute_b32(ROCm 10.0's hipcc emits no DPP for them), sharing the LDSpipe with the shared-memory q reads.
This builds the pre75 kernel for HIP wave32 (not the gfx906 wave64 backend) and runs it on gfx103x by default, with two
template parameters whose defaults keep CUDA exactly as it is:
NC_(cells per step): CUDA 2 as before; HIP 8. On gfx1030 every step up in NC was faster although occupancy wentdown from NC 1 (NC = 1 / 2 / 4 / 8: 101 / 142 / 149 / 144 VGPRs; 9 / 7 / 6 / 7 waves/SIMD), so the q reads, not
occupancy, bound it there - the opposite of the V100, where 4 was slower than 2.
DPP_: the butterfly's lane exchanges (inreduce12and the softmax's max / sum) in registers - DPProw_xmaskwithin a 16-lane row,
v_permlanex16across the two rows - instead ofds_bpermute. The same values move in the samepairing order, so every sum is unchanged bit for bit. CUDA keeps
__shfl_xor_sync.pre75_attn()on HIP: on for gfx103x (per device),STRATA_ATTN_PRE75=0off (as before),=1also on another wave32card. The CUDA branch of
pre75_attn()and the non-experimental CUDA build are unchanged.Measurements (one RX 6900 XT, ROCm 10.0, Qwen3.8-Flash-Next GSQ-RCO IQ3_S, KV int8)
Prompt tok/s, cold server per run, same binary with
STRATA_ATTN_PRE75=0vs default:With #835 (FP16 GEMMs) also applied, attention is a larger share of the prompt and the gain grows:
746 / 917 / 928 -> 801 / 1,022 / 1,041 (+7.4 / +11.4 / +12.2%). On that base, step by step (same three prompts):
Decode: measured unchanged within 1.3%, slightly faster (the A/B in "Validation and docs" below).
Related: #835
#835 runs the prompt path's 16-bit GEMMs FP16 in and out on gfx103x. The two changes are independent (different files,
either applies alone) and compound: with both, a prompt reads at 1.82x / 2.19x / 2.26x today's main on this card
(439 / 466 / 461 -> 801 / 1,022 / 1,041 tok/s at 9.4K / 34.7K / 105.8K). This one is bit-exact; #835 is not (its
distribution check is in its README).
Exactness
Teacher-forced log-probabilities (
STRATA_LOGPOS, top 256, 3 chats of 9.4K / 34.7K / 105.8K tokens read by the batchedprompt path, 1,578 scored positions): this change against the default kernel - KL 0, argmax and top-10 agreement 100%,
at every NC above and with DPP. ISA check (
-Rpass-analysis=kernel-resource-usage,-S): the DPP variant has 0ds_bpermute(154 without) and 103 LDS instructions (257).Not tested
CUDA builds (no CUDA on this machine; the CUDA path is unchanged by construction: template defaults equal the old
constants and
shfl_x<false>is__shfl_xor_sync). Other wave32 AMD architectures (opt-in withSTRATA_ATTN_PRE75=1).Validation and docs
-DSTRATA_BUILD_TESTS=ON, the same options as the engine build, gfx1030, ROCm 10.0): 60 of 65 pass, the same 60 as6f32ec0without this change. Skipped:hip_prompt_attn_wmma(no matrix cores on gfx1030),hip_prefill_hipblaslt_gemm(no hipBLASLt table). Failed for reasons outside the engine, identically with and without the change:ple_parity(a Q2_0 PLE file that is not on this machine),expert_multi_test(this Zen 3 CPU has no AVX-512),platform_memory_test(mlockat the shell's defaultulimit -l).STRATA_DECODE_TIMING=1, two rounds alternating): the window is 0.3-0.6 ms shorter with this change (56.0 -> 55.7, 42.2 -> 41.9, 42.5 -> 42.0, 44.2 -> 43.6 ms per window; the two rounds of one arm differ by at most 0.2 ms), decode 43-53 -> 43-56 tok/s. Details in the README below.docs/OLDER_GPUS.md's AMD table row for RX 6800 / 6900 (the kernel is the default on gfx1030, the switch, the gain) and its A/B-switches line; the measurements, compiler output and exactness check are inbench/results/2026-10-04-rdna2-pre75-attention/README.mdwith the configuration used.Developed with an AI coding assistant; every number above was measured on one RX 6900 XT (gfx1030) / Ryzen 5 5600X, ROCm 10.0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.