mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #255] [MERGED] HIP: build only detected archs and gate rocWMMA on WMMA-capable targets #429
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#429
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/mw00/project-maya/pull/255
Author: @andrewprock
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @mw00
Base:
main← Head:hip-rdna2-rocwmma-fix📝 Commits (3)
ded0c7cHIP: build only detected archs and gate rocWMMA on WMMA-capable targetsf74a781AMD docs: first validated gfx1030 run (Radeon PRO V620, Maya-L bench numbers)c6c710eAMD docs: reword the validation note📊 Changes
4 files changed (+29 additions, -6 deletions)
View changed files
📝
cmake/hip_backend.cmake(+16 -1)📝
docs/AMD_MAYA.md(+6 -1)📝
maya.py(+1 -1)📝
src/kernels/cuda/glm_batch.cu(+6 -3)📄 Description
Problem
Installing the HIP backend fails on machines where ROCm 7 no longer ships rocWMMA (
rocwmma/rocwmma.hppnot found) whenever the installer compiles a WMMA-capable arch alongside the user's card. This hits RDNA 2 users (gfx1030: RX 6800/6900, Radeon PRO V620/W6800) hard, since the installer always compiledgfx1100;gfx1201;gfx1151;gfx1030regardless of the installed card.Fix (one logical change, three files)
maya.py—check_hip_pc()now setsCMAKE_HIP_ARCHITECTURESto the archs of the detected cards only, instead of every validated arch plus the unvalidated list.cmake/hip_backend.cmake— derivesSTRATA_HAS_WMMAfrom the target arch list (gfx110x/115x/120x) and exports it as a compile definition.src/kernels/cuda/glm_batch.cu— the host compile pass includesrocwmma/rocwmma.hpponly whenSTRATA_HAS_WMMAis set; the device pass keeps its per-arch__gfx*__checks (rocWMMA'sconfig.hppstatic_asserts on RDNA 2, so the device pass already skipped it). A WMMA-less RDNA 2 build now links without rocWMMA present.First validated gfx1030 run
Hardware: Radeon PRO V620 (30 GB, gfx1030), AMD Ryzen Threadripper PRO 3975WX (32 cores), 208 GB RAM, ROCm 7, Linux. Model: Maya-L (IQ3_S, 156.3 GB), fully resident — 129.5 GB of experts pinned in RAM plus 19.06 GB VRAM expert pool, zero disk reads during decode (
STRATA_GLM_RAM_RESIDENT=1, context 131072).maya.py --bench(greedy, thinking off, warm-up first):Engine notes: model loaded in 72 s, warm tiers in 31 s; decode ~67–81 ms/token with 28–42 RAM fetches/token (CPU lane 21 threads, 0.205 ms/expert vs 0.470 ms over PCIe, ~99–126 experts/token through the lane); VRAM hit rate 50–61%. The full
maya-bench.txt/maya-report.txtare available on request.docs/AMD_MAYA.mdis updated to reflect that gfx1030 is now validated, with these numbers.Measurements (before / after)
Per CONTRIBUTING.md, before/after on the same harness — with the caveat that there is no "before" performance number, because before this fix the build fails outright on a RDNA 2 machine with ROCm 7 (
rocwmma/rocwmma.hppnot found atsrc/kernels/cuda/glm_batch.cu:28). Before/after for the build itself:glm_batch.cu(rocwmma missing; rocWMMA not in ROCm 7 packages, not installable)maya.py --bench, three 256-token greedy questions, prefill at 2048/8192 — the documented harness)NVIDIA code path is unchanged. On WMMA-capable archs (gfx110x/115x/120x)
STRATA_HAS_WMMAis1, so the host pass compiles byte-identical code to before; the only functional change outside RDNA 2 is thatCMAKE_HIP_ARCHITECTURESnow contains the archs of the cards actually present instead of every validated arch, which only trims build time/output binaries.Relation to v1.1.13: that fix already removed rocWMMA from the device pass (its
config.hppstatic_asserts on RDNA 2, so the f16q kernel compiles empty there) — but the host pass still includesrocwmma/rocwmma.hppunconditionally, so a gfx1030 build still required the headers, which ROCm 7 no longer ships. This PR closes that remaining gap, and trims the arch list to the detected cards.The diff is build-system + one
#ifgate; no CUDA calls were added, so nothing new needed mapping ininclude/strata/hip_compat/(verified bytools/check_hip_compat.py).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.