mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2815] [CLOSED] strata-q36 on Volta: K-quant prompt experts on a register-fragment tensor-core kernel - prompt +22-25% on a V100, same tokens #4278
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4278
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/Niko1221/Strata/pull/2815
Author: @merbanan
Created: 10/16/2026
Status: ❌ Closed
Base:
main← Head:pr/q36-kquant-tc📝 Commits (1)
d6ccd35strata-q36 (sm_70): K-quant prompt experts on a register-fragment tensor-core kernel - pp512 1,688 -> 2,109 tok/s, pp16384 1,518 -> 1,856 on a V100, the same tokens📊 Changes
4 files changed (+294 additions, -2 deletions)
View changed files
📝
CMakeLists.txt(+7 -0)➕
include/strata/prefill/moe_tc_kq.hpp(+29 -0)➕
src/prefill/moe_tc_kq.cu(+245 -0)📝
src/qwen35/q36_engine.cu(+13 -2)📄 Description
On a Volta GPU, strata-q36's prompt-path MoE experts in Q4_K / Q5_K / Q6_K now use a new FP16 tensor-core kernel (
moe_tc_kq) instead of MMQ's dp4a path. This covers the gate/up and down products of a prompt chunk.How it works
mma.m8n8k4quad pairs each take a 32-value chunk of a 128-value k step.dequantize_row_q*_K. Weights are never staged in shared memory.Scope
STRATA_PREFILL_TCKQ=0keeps MMQ.CMAKE_CUDA_ARCHITECTURESincludes 70 (ornative/all). It is about 140 KB of device code, so default builds (120) are unchanged. Outside that build the header's inline no-ops leave the call site free of#ifdefs.Measured on one Tesla V100 PCIe 32 GB with Qwen3.6-35B-A3B-MTP-UD-Q4_K_M. The build is this branch on main
296b59d2with-DCMAKE_CUDA_ARCHITECTURES=70 -DSTRATA_MMQ_KQUANTS=ON. Each run isstrata-q36 --bench-pp(--max-context 131072), plus a 16K-token greedy generation compared by md5. Two cooled rounds, alternating the two settings:STRATA_PREFILL_TCKQ=0(MMQ)The products use FP16 operands with FP32 sums, so they are not bit-identical to MMQ. The 16K greedy tokens came out identical in all four runs. The same kernel design in a Maya-based engine also matched llama.cpp's greedy output for 128 of 128 tokens on this model.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.