mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #229] Speed report: 4x MI100 (gfx908), Maya-S24, 262144 context — v1.1.12 #88
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#88
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 @nsaxploit on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/229
Speed report per CONTRIBUTING.md:
./maya.sh --benchthen./maya.sh --reporton a build from source (HIP), Maya v1.1.12, commit7f96a3a.Hardware
/opt/rocm-7.2.4), amdgpu in-tree driverEngine command and environment
./run-maya-maya-s24-hip.sh --host 0.0.0.0→maya.py --config maya-maya-s24-hip.json --port 8099; server launches/mnt/nvme0/GLM/maya/build-hip/strata --servewith:Environment (
STRATA_GLM_*):STRATA_GLM_RESERVE_MB=3072,STRATA_GLM_RAM_HEADROOM_GB=16,STRATA_GLM_PREFILL_SUB=4096,STRATA_GLM_PREFILL_MB=6144,STRATA_GLM_RAM_GB=60.Model and context
--kv-streaming on— KV is 0.25 GB per GPU at this context; the expert pool still holds 100% of routed experts in VRAM (12384/15040 slots,vram hit 100.00%, CPU lane never engages)Bench results (
./maya.sh --bench, 2026-10-16)[0,12)/[12,24)/[24,36)/[36,45)across the four GPUs, one 64 KB host hop per boundary per tokenchunks of 8192 tokens (mixer sub-batches of 4096)What was measured / not measured
Measured: decode on three 256-token greedy questions, prefill at 2k/8k, startup memory layout and warm-up, one smoke completion at 262144 context.
Not measured: generation quality/correctness at long context (only 262144 load + a 14-token completion was verified), RAM/disk expert tiers (everything stayed in VRAM, so the CPU lane, disk readers, and RAM fetch paths never engaged), vision, batch/multi-client load, other quants.
maya-report.txt(26.7 KB, as produced by./maya.sh --report)@nsaxploit commented on GitHub (Oct 16, 2026):
Building this engine for gfx908 (4× MI100) — what it takes on v1.1.12
The numbers above come from a build with local, uncommitted changes on top of v1.1.12 — the released HIP backend refuses gfx908. What's needed, in case it's useful for the AMD area of CONTRIBUTING:
Why v1.1.12 refuses gfx908
cmake/hip_backend.cmakeclassifies archs into validated (gfx1100,gfx1201), community (gfx1101,gfx1200), unvalidated (gfx1010 … gfx1151) andFATAL_ERRORs on anything else;gfx908is in none of the lists.src/core/device.cu,arch_problem():warpSize != 32→ "runs wave64; Maya's HIP kernels need wave32".require_full_wave_mask(0xffffffff)traps on a 64-lane wave;__ballot_synctakes a 32-bit mask as-is;__syncwarpis workgroup-scoped; the__dp4achain has no CDNA branch; mapped host alloc doesn't force coherence (a CPU↔GPU doorbell spin can sit unseen in GPU L2).Approach (inherited from Strata's experimental gfx906/908 layer) — keep every kernel written for a 32-lane warp; a CUDA warp becomes the logical 32-lane half of the 64-lane wavefront, so arithmetic, lane mapping and reduction order stay identical to wave32:
#define HIP_DISABLE_WARP_SYNC_BUILTINS 1beforehip_runtime.h— the layer supplies its own sync builtins0xffffffffmask is interpreted per 32-lane half (kernels unchanged)static_cast<unsigned>(__ballot(p) >> (__lane_id() & 32))— each half sees its own bits; shift is 0 on wave32 (old behaviour)__syncwarp= wavefront-scope release fence + wave barrier + acquire fencehipHostMallocCoherent__dp4a→__builtin_amdgcn_sdot4on gfx908 (v_dot4_i32_i8exists on CDNA1)__nanosleep→s_sleepscaled to the unit (~40 ns each)Diff vs v1.1.12: 6 files, +61/−23
cmake/hip_backend.cmakegfx908) + configure status linesrc/core/device.cuwarpSize 64when compiled for the exact archinclude/strata/hip_compat/cuda_runtime.hcudaHostAllocinclude/strata/hip_compat/intrinsics.hppsyncwarp, CDNAsdot4, sleep scalingtests/hip/intrinsics.cppmaya.pygfx908arch tier, compile for exactly the chosen cards, HIP GPU-count limit raised from 2 to the engine's 16-part split, tests built onBuild (tested on ROCm 7.2.4):
Prereqs: ROCm 7 with a HIP compiler + hipBLAS(+Lt), CMake ≥ 3.24, C++20, Python 3.10+. With
gfx908accepted,./maya.sh --backend hip --checklists the cards as usable and the normal setup path passes these flags itself.Run / the wave64 gate — the parity harness is what certifies the half-wavefront layer:
Notes
--gpus 0,1,2,3) works: upstream's HIP setup accepts at most two cards; the diff raises this to the engine's 16-part limit. One 64 KB host hop per boundary per token — no P2P needed.tools/hip/tune_hipblasltcould generate one.vram hit 100.00%, CPU lane off, RAM/SSD tiers idle in this configuration.Status: local experimental changes, not upstream. Validated here by build, the benchmark above, and serving; the parity suite ships with the build (
STRATA_BUILD_TESTS=ON) — I can post those results too. Happy to open a PR with this diff and the measurements, per CONTRIBUTING, if it's useful.@mw00 commented on GitHub (Oct 16, 2026):
Thanks a lot for this, @nsaxploit - 58.5 tok/s on four MI100s, and the build notes are exactly what we needed. Yes, please open the PR. Two requests:
hipHostMallocCoherentfor mapped allocations and the fenced__syncwarp. The Strix Halo and the RDNA cards lean on mapped host memory (on an APU the RAM tier is host memory), so we'd like those to apply only when building for wave64 (gfx908, and gfx906 if it fits), with wave32 builds compiling to what they do today. We'll check the PR on a Radeon 8065S for the same tokens and speed before merging.We don't have MI100 or MI50 cards, so it would ship as experimental, validated on yours: the parity results (your ctest list and
hip_expert_kernel_bench --parity-only --sweep) in the PR would help. The MI100 owner in #176 may be able to test it too, and if gfx906 works with the same layer, the MI50 owner in #193.@nsaxploit commented on GitHub (Oct 17, 2026):
PR up: https://github.com/mw00/project-maya/pull/245 — parity results are in the PR description.
@mw00 commented on GitHub (Oct 20, 2026):
Thank you, @nsaxploit! The MI100 support is tracked in your PR #245 (it needs a rebase on the current main); closing this report in its favour.