mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #298] [CLOSED] hip(exl3): implement portable grouped-expert prefill kernels #456
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#456
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/298
Author: @LostVector
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:feat/exl3-hip-prefill📝 Commits (2)
1f68e8fexperiment(exl3): add portable HIP prefill kernelsb51d489docs: record experimental HIP EXL3 validation and limits📊 Changes
3 files changed (+177 additions, -5 deletions)
View changed files
➕
docs/EXL3_HIP.md(+48 -0)📝
src/kernels/cuda/exl3.cu(+125 -5)📝
tests/exl3_test.cu(+4 -0)📄 Description
HIP currently compiles
exl3::set_gate_up,set_downandgemm_rowsas no-ops. This supplies portable prefill kernels so manually configured DeepSeek EXL3 models can actually execute the grouped-expert path on AMD.The kernels reuse the existing eight-activation
block_gemvdecoder, handle routed row bounds on the device, apply gate/up scales and clamped SwiGLU, and consume FP16 down/GEMM inputs through a separate adapter. Original decode input structure is preserved. CUDA retains its tensor-core path. This is an FP32 FMA bring-up implementation, not an optimized WMMA port.Validation on ROCm 7.14.1 / gfx1201:
maya-ds4andexl3_testbuild successfully.exl3_testpasses: 0 failures, 0 launch errors. HIP now runs the previously skipped CPU-reference grouped-expert and FP16-row GEMM cases, including empty experts and row tails. Existing decode/window exactness tests pass.Practical setup comparison (same fixed synthetic API prompts; one output token, temperature zero, reasoning none,
cache_n=0):Repeated 256-token generation: 18.6 tok/s EXL3 versus 18.2 Q8 (first runs 12.1 versus 13.4). Ryzen 9950X / 256 GB RAM;
DS4_SPLIT=36,4, context262144, reserve2048 MiB, explicit RAM experts. Host expert storage is173.1 GB with EXL3 versus237.9 GB in the Q8 setup.These are setup comparisons, not an isolated quant/kernel A/B: Q8 used
abc09c7plus the optimization in #297; EXL3 used8d9a9b5, that optimization and these kernels. Quant, expert profile and default chunk size differ (8192 Q8,2048 EXL3). Both setups enableDS4_SKIP_UNPICKED=1; #297 remains a separate PR and is not included here. Unmodified HIP grouped EXL3 prefill is a no-op, so there is no valid EXL3 before/after performance baseline.Draft / remaining work: independent full-model EXL3 parity and broader quality checks; NVIDIA build/runtime validation; more hardware and shapes; optimized AMD matrix-instruction kernels. Vision and DSpark are disabled in the trial. The installer’s EXL3 HIP rejection stays in place; this PR deliberately does not advertise general setup support. Documentation records the manual launch and validation limits.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.