mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #355] HIP build: ninja fails on three test targets - strata_engine's glm_prefill.cu needs strata_prefill (undefined strata::prefill::Gemm) #141
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#141
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 @precisionailabsllc-collab on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/355
Summary
Reported from a Strix Halo (Ryzen AI Max+ 395,
gfx1151, ROCm 7.14) — on that machine a plainninjaafter adefault configure fails, so this blocks the build out of the box.
On a HIP build, a default configure (
STRATA_BUILD_TESTSdefaults to ON) followed byninjafails at link timefor three tests:
split_groups_testexpert_profile_version_testexpert_profile_save_testAll three link only
strata_engine, but on HIPstrata_engine'sglm_prefill.cu.oreferencesstrata::prefill::Gemm, which is defined insrc/prefill/gemm.cuand compiled into the separate static librarystrata_prefill.ninja maya-ds4andninja mayaare unaffected: the engine targets already link both libraries.The build is otherwise good — the engine built by
ninja maya-ds4runs the Maya-S pack on this machine.Environment
451f9cb)6.18.44+rex+5-amd64, Ryzen AI Max+ 395 (Strix Halo),gfx1151CMAKE_BUILD_TYPE=Release,CMAKE_HIP_ARCHITECTURES=gfx1151,STRATA_ENABLE_HIP=ON,STRATA_ENABLE_CUDA=OFF,STRATA_PREFILL_MMQ=ON,STRATA_BUILD_TESTS=ONSteps to reproduce
Expected
The build completes.
Actual
Linker output (first of the three, identical symbols in all three):
Analysis
src/core/glm_prefill.cu:554declaresstd::unique_ptr<strata::prefill::Gemm> lt;and:1993-1995callsstd::make_unique<strata::prefill::Gemm>()/init_external(...); both are inside#if defined(STRATA_USE_HIP)(:554,:1989). That is where the reference comes from.src/prefill/gemm.cu(namespace strata::prefillat:35,Gemm::init_externalat:302), compiled intoadd_library(strata_prefill STATIC src/prefill/gemm.cu src/prefill/kernels.cu src/prefill/prefill.cpp)—CMakeLists.txt:430.CMakeLists.txt:416-423, whose only link line istarget_link_libraries(${_t} PRIVATE strata_engine). On HIP that pullsglm_prefill.cu.oout ofstrata_enginewith nothing to satisfy thestrata::prefillsymbols.mayausesstrata_engine strata_prefill(
CMakeLists.txt:443), and the GLM test set usesset(_strata_gpu_glm_libs strata_engine strata_prefill)(
CMakeLists.txt:626-628, with the ordering note at:626).Suggested fix
In the loop at
CMakeLists.txt:416-423, addstrata_prefill, in the order the other GLM targets use:or, to keep the CUDA link line minimal (the reference is HIP-only):
Any other target that links only
strata_engineon HIP and pullsglm_prefill.cu.owill need the same treatment;these three are the ones the default test set hits.
Workaround
The engine builds and runs; only the three test targets fail.
Scope / confidence
v1.1.21(451f9cb), HIP only, with a clean configure and a fullninja.Gemmuse sits behind#if defined(STRATA_USE_HIP)); I have noNVIDIA card to confirm that.
ninja maya-ds4on the same tree exits 0 and the resulting binary (19,751,368 bytes) loads the Maya-S pack(7,634 of 15,744 experts in VRAM on this 128 GB APU) and serves requests.
@mw00 commented on GitHub (Oct 22, 2026):
Fixed in v1.1.22: the three test programs now link the prefill library after the engine library, so a plain
ninjabuilds on HIP. Thanks for pinning it down!