mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4589] [Engine] HIP source build fails since v0.1.45: __shared__ alignas(16) int4 in iq_kernels.cu (expdec verify window) #2076
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#2076
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?
Originally created by @ljubomirj on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4589
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (
setup.sh --buildon Linux, ROCm system install)What happened
A source build of the AMD (HIP) engine fails. Compilation stops in
src/kernels/cuda/iq_kernels.cu:I expected the engine to build as it did on v0.1.42; this is the expdec "Evaluate window" kernels.
The same file already documents this exact toolchain rule and carries a macro for it (line ~1869, #778):
The two
int4declarations added later use the bare__shared__ alignas(16)form and bypass that macro. CUDA is unaffected (nvcc accepts the form), so this is HIP-only. The declarations compile unconditionally even thoughSTRATA_EXPDECis a runtime opt-in, so it blocks every AMD source build.Introduced by
f7eaf2de("Verify window: the routed experts' gate/up with the group's q8_1 rows in shared memory (STRATA_EXPDEC=1, opt-in, bitwise)…"); first tag that contains it is v0.1.45, so every release from there on. My previous clone was v0.1.42, which is why it built in October.Smallest steps or command that reproduce it
main(46c152a1, v0.2.7.1) on a gfx1100 machine with system ROCm 7.1.1.ROCM_PATH=/opt/rocm-7.1.1 ./setup.sh --backend hip --family qwen --model IQ3_XXS --context 262144 --kv int8 --low-ram auto --vision no --draft-vocab en --port 8081 --data-dir … --build --yes --no-start(or the equivalent
cmake -DSTRATA_ENABLE_HIP=ON … && ninja stratainbuild-hip/).iq_kernels.cu, lines 2571 and 2758, as above.Note:
./update.shdoes not compile and only reports "the engine was NOT: it is still 0.1.42 and this Strata wants 0.1.46 or newer", so the compile is only reachable throughsetup.sh --build.Reproduction status
Reproduced locally
Strata version
Strata 0.2.7.1 (
46c152a1, v0.2.7.1) · engine 0.1.53 (built after the fix below)Graphics card, memory and system
RX 7900 XTX 24 GB (gfx1100) · 126 GB RAM · Ubuntu 22.04.5, kernel 5.15 · system ROCm 7.1.1 (AMD clang 20.0.0git, hipBLASLt 1.1.0) · single card
Model, size and settings
Qwen3.8-Flash-Next IQ3_XXS · 262 144 context ·
--kv int8·--spec 4+ MTP ·--expert-cache auto· text only (no vision). (Only the build is affected; the model starts fine once the engine compiles.)Logs
Suggested fix
Give
int4the same split the file already has foruint32_tand use it at both sites:With that one file changed (+9/−2), the same command builds engine 0.1.53 and the model runs on this card (prefill ≈1500–1580 tok/s at 8.8 K, decode ≈80–88 tok/s, parity with v0.1.42 at the same settings).
What I did not test: whether a newer AMD clang accepts the original form. My check is ROCm 7.1.1 / clang 20 only; I have not built unpatched with ROCm 7.2.x (clang 22).
@suvayu commented on GitHub (Oct 29, 2026):
I'm also seeing the same issue for about a week. Last version I tried was v0.2.7.1.
Steps
Instead of using the setup script, I am calling cmake directly. These are my steps:
Environment
OS: 7.2.13-200.fc44.x86_64 (Fedora 44)
ROCm is from Fedora repositories. I use this same environment for llama.cpp and DwarfStar4:
EDIT: I had some time and found a possible fix using DeepSeek, see the linked PR
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.