mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #485] [CLOSED] EXL3 prompt on V100 / T4 / RTX 20: the light experts on the tensor cores (wmma) - prompt +5-11% on a V100 #557
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#557
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/485
Author: @merbanan
Created: 10/25/2026
Status: ❌ Closed
Base:
main← Head:pr/exl3-v70-prompt📝 Commits (1)
8c006b1EXL3 prompt on Volta / Turing: the light experts on the tensor cores (MAYA_EXL3_WMMA, on by default on sm_7x)📊 Changes
4 files changed (+119 additions, -9 deletions)
View changed files
📝
docs/SETTINGS.md(+2 -1)📝
include/strata/kernels/exl3.hpp(+3 -0)📝
src/core/glm_prefill.cu(+2 -2)📝
src/kernels/cuda/exl3.cu(+112 -6)📄 Description
What
On NVIDIA GPUs before the RTX 30 (sm_7x: V100, T4, RTX 20), every EXL3 expert in a prompt was decoded to FP16 and multiplied by cuBLAS, even an expert routed one or two tokens of the chunk.
x3_run_setsends light experts (MAYA_GLM_EXL3_MMA_ROWS, 64) to the tensor-core kernels only wheremma_supported()holds, which is sm_80+ (mma.m16n8k16).This PR runs the matrix-core prompt kernel there:
wmma_set_kernel, which RDNA 3 already uses.nvcuda::wmma's 16×16×16 FP16 product with F32 sums.ldmmust be a multiple of 8 halves.xb, read column-major.out.exl3::prompt_tc()(mma_supported() || wmma_now()) is whatx3_run_setasks now.MAYA_EXL3_WMMAis on by default on sm_7x;=0gives cuBLAS for every expert, as before. It has a row indocs/SETTINGS.md, and theMAYA_GLM_EXL3_MMA_ROWSrow now names these GPUs.EXL3_WMMA/EXL3_WMMA_ROWSand does not takeprompt_tc(tools/check_hip_compat.pypasses).Correctness
exl3_test's set tests on the V100: every K, 3 experts and 107 rows, against the reference.Every set test passes, rel 6e-5 to 1.1e-4, about what the CUDA-core kernels give (7e-5 to 9e-5); 0 failures, 0 launch errors.
KL against BF16: malaiwah's fidelity suite, 15 contexts × 511 positions, teacher-forced, so this measures the prompt path itself. CPU lane off, fixed RAM tier.
MAYA_EXL3_WMMA=0(cuBLAS)(BF16's NLL is 1.5421.) The difference is within run-to-run noise.
Speed
Measured on a Tesla V100-PCIE-32GB at 250 W with a Ryzen 9 7950X and turboderp's EXL3 2.05bpw.
Prompt, default settings (2 alternating rounds, tok/s):
=0On upstream main v1.1.27; each round with the change was faster.
The gain is largest on short prompts, where most experts are light. Decode is unchanged.
MAYA_GLM_EXL3_MMA_ROWSon this card (1 round, prompt tok/s at 2K / 8K / 27K):128 may be about 1 % better here, but that's one round, so the default stays.
Not run on a T4 or RTX 20.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.