mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1749] [CLOSED] Two HIP fixes for Strix Halo (gfx1151): the wide top-k kernel and the VMM entry points #3649
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#3649
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/1749
Author: @vlupilin
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:strix-halo-fixes📝 Commits (2)
1b7d181topk: compile the wide kernel on HIP too (it was CUDA-only; every deep context on AMD paid the ref radix)3ae428bvmm: resolve the driver entry points under their hip- names on HIP📊 Changes
2 files changed (+24 additions, -5 deletions)
View changed files
📝
src/core/vmm.cpp(+18 -0)📝
src/kernels/cuda/qsa_select.cu(+6 -5)📄 Description
PR: two HIP fixes for Strix Halo (gfx1151) — the wide top-k kernel and the VMM entry points
Both changes are "a CUDA-only path that is dead on AMD for no hardware reason".
No behaviour change on NVIDIA cards; both are measured on a Ryzen AI Max+ 395
(Radeon 8060S, gfx1151, ROCm 10.1) with Qwen3.8-Flash-Next IQ3_XXS, 512K
context (YaRN 2), and reproduce with the repo's own tools (
qsa_select_bench).1. topk: compile the wide kernel on HIP too
block_topk_wide_kernelis plain shared-memory / atomicAdd code (no sm_90feature), but its definition and dispatch branch sat behind
#if !defined(__HIPCC__). On AMD every context past the register kernel'sreach (~135K cells) fell back to the 4-pass ref radix. The ids are identical
by construction —
qsa_select_benchstates 256/256 at 256 queries x 65537blocks and 1/1 at nq=1.
Measured (
qsa_select_bench, gfx1151):End-to-end on that PC this (with the scorer change of a follow-up) took the
decode of a 512K-token prompt from ~24-26 up and flattened the prefill curve
(515K: 473 -> 634 tok/s).
STRATA_TOPK_STREAM=0still restores the registerkernel.
2. vmm: resolve the driver entry points under their hip- names on HIP
vmm.cpplooks upcuMemAddressReserve& co. by name;libamdhip64exportsthe same entry points only as
hipMemAddressReserve,hipMemCreate, ... — sovmm_available()was always false on AMD and--kv-grow(and the VMM expertcache) could never engage; the flag just printed "is off". The signatures
match, so on
__HIPCC__the resolver now dlsym's the hip- name of the sameentry point.
With this, the APU loads
--kv-growwith--expert-cache 24576(all experts,49.8 GiB of GTT) and serves requests. Caveat we hit during bring-up: after one
K/V growth transition the first request hung once (watchdog restart); we run
this combination only under supervision, so the elastic paths deserve their
own validation pass on other cards before the default changes.
Validation on our side
native_grouped_parity,hip_native_qsa_score,hip_prefill_fused_iq:all pass (the top-k ids gate is inside
qsa_select_bench).ExpertCache::verify_slotbyte-check passes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.