Skip to content

cuda: keep the extended tall mat-vec types off fused gate+up launches - #419

Merged
bri-prism merged 1 commit into
prismfrom
cuda/mmvq-tall-skip-fused-gate
Oct 30, 2026
Merged

bri-prism merged 1 commit into
prismfrom
cuda/mmvq-tall-skip-fused-gate

Conversation

@bri-prism

Copy link
Copy Markdown
Collaborator

What

Why

  • On fused gate+up pairs the tall geometry is slower than the default one; it helps plain one-column mat-vecs such as the output head.

How

  • One extra condition in should_use_tall: extended types are tall only when fusion.gate == nullptr. The K partition and reduction order do not change, so output is identical.

Testing

  • test-backend-ops MUL_MAT, MUL_MAT_ID and MUL_MAT_VEC_FUSION pass (CUDA vs CPU).
  • Greedy output is byte-identical before and after on a Q8_0 model and a PQ2_0 model.
  • H200 tg128 (alternating runs): Q8_0 2B model 563 -> 578 tok/s (+2.6%); PQ2_0 model unchanged.

The 8-rows-per-CTA geometry for Q8_0/Q4_0/Q2_0/Q4_K/Q6_K helps plain one-column
mat-vecs but costs time on fused gate+up pairs. Leave those on the default
geometry; PQ2_0 keeps its existing behavior. Output is unchanged.
@bri-prism
bri-prism merged commit 02bd091 into prism Oct 30, 2026
8 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant