mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[PR #7] [MERGED] HIP prompt speed: tuned hipBLASLt GLM projections, runtime sub-batch (7900 XT, R9700, Strix Halo) #276
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#276
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/7
Author: @boxwrench
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @mw00
Base:
main← Head:perf/glm-prompt-hipblaslt📝 Commits (8)
ea1d6b3Add experimental Linux gfx1100 setup and GLM HIP compatibilitycdf403aPort Strata multi-architecture HIP checks and RDNA4 intrinsicsfd1b89dCheck HIP architecture list normalization and rejection cases44170e0Document multi-architecture R9700 validation and compile-only gfx1151fede389Let HIP choose the GLM prefill chunk951ee6dHIP prompt speed: tuned hipBLASLt GLM projections and a runtime sub-batcheed624cKeep the hipBLASLt prompt path HIP-only and link the GLM binaries in order9acdc27Update AMD audit docs for GLM hipBLASLt📊 Changes
33 files changed (+1376 additions, -95 deletions)
View changed files
📝
.gitignore(+4 -0)📝
CMakeLists.txt(+20 -5)📝
README.md(+3 -0)📝
cmake/hip_backend.cmake(+47 -8)📝
docs/AMD_HIP.md(+5 -0)➕
docs/AMD_MAYA.md(+142 -0)➕
docs/AMD_RDNA4.md(+78 -0)➕
docs/AMD_UPSTREAM.md(+71 -0)📝
include/strata/core/device.hpp(+3 -0)📝
include/strata/hip_compat/cublas_v2.h(+4 -0)➕
include/strata/hip_compat/cuda_profiler_api.h(+4 -0)📝
include/strata/hip_compat/cuda_runtime.h(+10 -0)📝
include/strata/hip_compat/intrinsics.hpp(+71 -33)📝
maya.py(+136 -10)📝
setup.py(+7 -6)📝
src/core/device.cu(+51 -5)📝
src/core/device_main.cpp(+1 -1)📝
src/core/glm_fast_path.cu(+6 -0)📝
src/core/glm_model.cu(+1 -1)📝
src/core/glm_prefill.cu(+47 -17)...and 13 more files
📄 Description
Faster prompt processing on AMD. Tracking issue: #6.
Experimental AMD support for Maya: Linux, one GPU, text only. It carries the former #3 (RX 7900 XT setup) and #4 (R9700 and multi-architecture builds), rebased on v1.0.10.
What changes
hgemm_qinsrc/core/glm_prefill.cugoes through the existingstrata::prefill::Gemm::f16whenSTRATA_HIPBLASLT_TUNINGnames a table. Without a table nothing changes; shapes without a row keep plain hipBLAS. HIP only.STRATA_GLM_PREFILL_SUBreplaces the compile-time 256-token sub-batch of the mixers and the dense FFN. The default is still 256, so CUDA behaviour is unchanged.maya.pyno longer forcesSTRATA_GLM_PREFILL_CHUNK=256for HIP. On cards with 20 GB or more it writesSTRATA_GLM_PREFILL_SUB=1024andSTRATA_GLM_PREFILL_MB=4096(borrowed from the expert pool only while a prompt runs), plus the card's table when one is shipped.tools/hip/tune_hipblasltscales its absolute-error gate withsqrt(K / 4096). A fixed 0.01 rejected every solution for the K=16384 projection even though relative L2 was 5e-5 against the 1e-4 limit.tools/hip/{gfx1100,gfx1151,gfx1201}-glm-hipblaslt-100202.txt(hipBLASLt 1.2.x, ROCm 7.2). The gfx1201 table keeps only rows at least 2% faster than hipBLAS, which is already close on RDNA4.PrefillStateare HIP-only, so CUDA's prompt path is unchanged. On HIP,glm_model_test,glm_pack_testandglm_model_big_testlinkstrata_engine strata_prefill, asstratadoes.Measured
GLM-5.3-Flash Maya-S-v2 IQ2_XXS, 8K context, prompt tok/s:
The Strix Halo numbers come from a local build of the same prompt-path change. Per GEMM, hipBLASLt is 3-7.5x faster than
hipblasGemmExon gfx1151 and the 7900 XT; on gfx1201 it's ~1-1.7x.Tested on this branch
gfx1100;gfx1201;gfx1151with ROCm 7.2.1.glm_{hc,kda,ffn,dsa,layer}_parity,glm_model_test,hip_intrinsics,hip_handoff,hip_glm_handoff,hip_glm_prefill_attention,iq1_s_parity,hip_prefill_mmq_parity,hip_expert_cache_staging, the device selftest, andglm_hc_parityunder HC2 and HC1.tools/test_maya_hip.py(6 tests, one new for these config defaults) andtools/test_hip_archs.py(5) pass.maya.pynow writes: 7 smoke checks (arithmetic, code, a two-turn conversation, three 400-token answers) and 5 back-to-back prompt+answer rounds pass. The table loads (60 rows, gfx1100, version 100202) with zero fallbacks; prompts run at 307-385 tok/s on 1.8-2.5K-token prompts.glm_prefill.cuno longer referencesstrata::prefill::Gemmon CUDA, and the CUDA link lines are as on main.--benchand--reportstill usebuild/andnvidia-smi; a separate PR will give themselect_build_backend()and an AMD GPU query.Known issue (not in this PR)
The experimental all-experts-in-RAM mode (
STRATA_GLM_RAM_ALL, not part of this PR) hits an intermittent GPU memory fault after a few requests, with or without the CPU lane or prefetching. Maya's normal exclusive tiers with a large RAM budget are stable. I'll follow up in #6.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.