mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #470] HIP EXL3: specialize single-row decode by default #547
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#547
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/470
Author: @LostVector
Created: 10/25/2026
Status: 🔄 Open
Base:
main← Head:upstream/hip-exl3-single-row📝 Commits (3)
3584172HIP EXL3: add opt-in single-row decode kernel978c589docs: scope current single-row decode measurements and numerical checks2c395ecHIP: select the EXL3 single-row kernel by default with explicit opt-out📊 Changes
4 files changed (+147 additions, -22 deletions)
View changed files
📝
CMakeLists.txt(+6 -0)📝
docs/SETTINGS.md(+25 -0)📝
src/kernels/cuda/exl3.cu(+57 -22)📝
tests/exl3_test.cu(+59 -0)📄 Description
A controlled DS4 screen on three R9700s measured 4.4% higher token-generation throughput with draft proposals disabled (3.4–5.0% across three workloads). MTP improved about 0.7%. This gives one-token EXL3 matrix calls a smaller GPU kernel: their shared-memory buffers and accumulators hold one activation row instead of eight. On HIP, eligible one-row batches now select this kernel automatically.
No setting is needed on HIP. Set
DS4_EXL3_MV1=0to force the generic path; unset it or use1to restore automatic single-row selection. Every job in a batch must have one row to select the specialization. A batch containing any multi-row job keeps the generic kernel. Routed-expert kernels keep their existing path, and the input-split planner and partial-sum order stay unchanged. There is no new expanded-weight cache, quantization change, or expert-capacity change.Measured on upstream
4615f34(v1.1.27), Ryzen 9950X / 256 GB RAM, three R9700s, ROCm 7.14/gfx1201:The native-driver test used one loaded model, fixed expert placement (
--no-expert-cache), and four adjacent counterbalanced on/off pairs per workload and drafting mode. Each measured request produced 128 tokens; all 12 pairs without proposals improved. The same 4-bit drafter stayed loaded on GPU2 in both modes to preserve VRAM allocation;spec=0suppresses proposals and may still maintain drafter state. The target was DeepSeek-V4.1-Flash-1017 EXL3 3.5bpw, TP2 split 36/4, CPU 16, confidence 0.65 / cumulative 0.5, maximum context 262144, prefill chunks 4096. Tested prompts extend to 16K, not the maximum context.The benchmark model also included draft #464's optional drafter placement. A private host-only diagnostic selector chose the existing generic/single-row entry points between requests; production GPU kernel code was unchanged. That selector and the diagnostic dump toggle are not part of this PR. Full-logit dumps ran separately after timed requests. An initial four-load ABBA comparison was not accepted as confirmation because its controls drifted substantially; the same-residency follow-up controls reload-related variation but is not an independent fresh-load performance replication or production API acceptance.
Validation:
maya-ds4andexl3_testpass. HIP CTest entries cover default selection, explicit enable and generic opt-out; rollback is documented.NVIDIA/Windows runtime and other GPU architectures remain unvalidated. The observed MTP benefit is small; the measured benefit is primarily ordinary one-token decoding. The HIP single-row default changes in this proposal; the running serving configuration was not changed. Earlier experiments are retained in fork PR https://github.com/LostVector/project-maya/pull/51; their older API measurements do not validate this newer engine.
Current-base rebase validation (
f031a23, v1.1.36): rebased while preserving upstream high-bitrate batch and MoE coverage. The HIP operator test compiles and links for gfx1100 and gfx1201. Both full operator suites, withDS4_EXL3_MV1=0and1, pass on an R9700 with zero failures and launch errors, including the mixed-row fallback checks. No fresh whole-model throughput or quality comparison is claimed, and RDNA3/NVIDIA/Windows hardware were not tested in this preparation.Automatic selection and rollback validation
Eligible HIP batches now select the single-row specialization by default. Every job must have exactly one activation row; mixed or multi-row batches retain the generic kernel.
DS4_EXL3_MV1=0forces the generic path, while unset or1permits automatic selection. Code comments document the batch-wide guard and unchanged input-split/reduction ordering.The updated operator binary builds for gfx1100 and gfx1201. On an R9700, all three full CTest suites pass: default environment, explicit
DS4_EXL3_MV1=1, and explicit0. Each reports zero failures and launch errors, retaining existing CPU-reference tolerances, exact comparisons, mixed-row fallback checks and output guards. No tolerance was relaxed. This validates the default change and fallback; the throughput figures above remain the historical model measurements, not a new performance benchmark. The running serving process was not changed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.