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#2877
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/858
Author: @agurrrrr
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:gfx906-fused-gr-compat📝 Commits (10+)
fa16567setup: an earlier config that does not parse is skipped, not a crash; configs are written atomically (#459)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 it📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
include/strata/platform/hip_compat/strata_hip.h(+5 -1)📄 Description
What this fixes
STRATA_HIP_GFX906=ONdoes not build atmain(6f32ec0, v0.1.39). The fused_gr v3 read thatcfd3b72put onmain calls
cudaFuncSetAttributeon kernel templates with more than one argument, and sets the shared-memorycarveout: (
cfd3b72is the same work as PR #646 - same author, same subject line - but it went onto main as a directcommit; PR #646 itself was closed unmerged on 2026-10-04, so the calls below are main's own, from
cfd3b72.)f166564added the carveout name to the wave32 compat header (include/strata/hip_compat/cuda_runtime.h), whichalready has
cudaFuncSetAttributeas a template function. The gfx906 compat header(
include/strata/platform/hip_compat/strata_hip.h) has neither:cudaFuncSetAttributeis a function-like macro there, so the preprocessor splitsgr_down_v3_kernel<1, 4, true>at its commas into extra macro arguments;
cudaFuncAttributePreferredSharedMemoryCarveoutis not mapped.The build stops at fused_gr.cu with 12 errors, the same ones for each of the five calls on lines 1089-1093:
The change (1 file, +5 / -1): the macro becomes a template function of the same shape as the wave32 header's, and the
carveout name maps to
hipFuncAttributePreferredSharedMemoryCarveout. The header is on the include path only underSTRATA_HIP_GFX906(theSTRATA_HIP_GFX906block isCMakeLists.txt:106-124, and the three include-path entries are116, 119 and 120), so the CUDA build and the wave32 HIP build do not see it.
How it was checked
AMD Instinct MI50 32 GB (gfx906, PCI id 1002:66a1;
rocm-smireports 34,342,961,152 B of VRAM), EPYC 7452,125 GiB RAM; CachyOS (kernel 7.2.8), ROCm 7.2.4 (HIP 7.2.53211,
AMD clang 22.0.0git).
main(6f32ec0),ninja .../fused_gr.cu.oninja(all targets,STRATA_BUILD_TESTS=ON)The three flags beyond
docs/AMD_HIP.md's command are for this distro's ROCm packaging, not for this change: clangsits in
/opt/rocm/lib/llvm, so CMake guesses the ROCm root as/opt/rocm/lib, fails to identify the HIP compilerand drops
-O3 -DNDEBUG(henceCMAKE_HIP_COMPILER_ROCM_ROOTand--rocm-path); and GCC 16's<format>spells[[__gnu__::__noinline__]], which HIP's__noinline__macro breaks (hence GCC 14's headers).On the card. An engine built from the same source tree (byte-identical to this branch) has served on the MI50
since 2026-10-05: Qwen3.8-Flash-Next GSQ-RCO IQ3_S,
--max-context 262144 --kv int8 --spec 4, the experts in hostRAM. Every other
cudaFuncSetAttributecall in the gfx906 build (fused_gr.cu:725-731,qsa.cu, the prefillkernels) now goes through the template and makes the same
hipFuncSetAttributecall as the macro did. Measured on thatserver, greedy (a range is two runs, a single number one run):
A needle in the 43K and in the 78K prompt is found, and an OpenAI tool call returns the right arguments.
Where those numbers come from: the short-prompt and the 4,526-token rows are the
iq3s-0139-alone-mi50entries ofmy bench log (
~/code/local-llm/bench/strata-vs-golbang/results.jsonl; greedy, 768 generated tokens, two reports perprompt), and the 42,705 and 78,284-token rows are long-prompt needle runs against the same server on the same day.
Not covered
STRATA_GR_V3=1, the opt-in read that sets the carveout, was not run on the card; this PR only lets it compile.ctestwas not run on the card for this PR: the card serves the model above with 586 MiB of VRAM left.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.