mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3283] [CLOSED] sm_70: keep the CUDA layout for the IQ4_NL down projection under Volta mode 8 #4547
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#4547
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/3283
Author: @aleesposito85
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:sm70-down-iq4nl📝 Commits (1)
1ef8beesm_70: keep the CUDA layout for the IQ4_NL down projection under Volta mode 8📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝
src/kernels/cuda/iq_kernels.cu(+14 -1)📄 Description
sm_70: keep the CUDA layout for the IQ4_NL down projection under Volta mode 8
What
On Volta (sm_70) with the mode-8 expert layout (
STRATA_SM70_TABLE=1),native_expert_groupedroutes the down projection through
native_down_lds_kernelfor bothIQ4_NL(20) andQ2_0(42).native_expert_benchon an IQ3_S pack'siq2_s/iq4_nllayers shows that choice is a loss forIQ4_NL — the CUDA layout is faster — while mode 8 keeps its win on gate/up.
This mirrors the existing
sm75_down_em(): a newsm70_down_em(em0, d_type)returns mode 0 ford_type == 20on compute capability 7.0.Q2_0(42), every other type and every other arch keeptheir mode, and
STRATA_EXP_MODEstill wins when set.Measured
Tesla V100-SXM2-32GB, CUDA 12.8,
native_expert_bench, real rows of the IQ3_S pack, 10 groups,medians of 300.
allis the per-layer expert call (gate/up + fused SwiGLU + q8_1 + down).The down phase alone on the IQ4_NL layers: 25.8 -> 20.7 us (T=1), 39.2 -> 28.3 us (T=4); gate/up is
untouched (36.3 us at T=1, 55.0 us at T=4, the mode-8 win that stays).
Every row is bitwise equal to the reference mode (the bench checks every cell), so this changes
speed only.
Tests
native_expert_bench… bitwise equal on all rows above.-DCMAKE_CUDA_ARCHITECTURES=70 -DSTRATA_EXPERIMENTAL_SM60=ON(CUDA 12.8).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.