Skip to content

perf(ops): pipeline Q4/Q5 Attention groups at T32 - #311

Draft
MOVIBALE wants to merge 2 commits into
Neroued:masterfrom
MOVIBALE:perf/r8-q4-q5-grouped-pipeline
Draft

MOVIBALE wants to merge 2 commits into
Neroued:masterfrom
MOVIBALE:perf/r8-q4-q5-grouped-pipeline

Conversation

@MOVIBALE

@MOVIBALE MOVIBALE commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Decision

Keep the shared adjacent-group BK=128/GPB=2 grouped MMA mechanism and retain the exact T=32 route for Q4/Q5 A16 Attention only. Restore GDN T=32 selection to the upstream K64 route. No runtime cache detector, autotuner, device whitelist, or permanent experiment switch is added.

Why GDN is not enabled

At T=32, Attention improves in both Op cache cases, while GDN improves cold but regresses warm:

Op B route cold/warm AG route cold/warm Change
Attention 101.536 / 85.840 us 72.928 / 68.176 us -28.2% / -20.6%
GDN 124.928 / 92.304 us 99.568 / 102.288 us -20.3% / +10.8%

Two same-protocol C8 blocks ran in reverse order, B/A/AG then AG/A/B. Every request completed 1024 tokens, batch stayed 8, and all six waves used the same request seeds. The table reports actual steady committed tokens and MTP work; no profiler was attached.

Block/order Arm Steady committed tokens / seconds / intervals Batch Completion / decode tokens MTP rounds / drafted / accepted / fallback tok/s
1/1 B1 6558 / 15.000 / 15 8.00 8192 / 8184 3319 / 9948 / 4863 / 2 437.2
1/2 A1 7190 / 17.081 / 17 8.00 8192 / 8184 3253 / 9746 / 4928 / 3 420.9
1/3 AG1 7220 / 18.022 / 18 8.00 8192 / 8184 3374 / 10113 / 4807 / 3 400.6
2/1 AG2 7348 / 18.000 / 18 8.00 8192 / 8184 3274 / 9811 / 4909 / 1 408.2
2/2 A2 7098 / 18.000 / 18 8.00 8192 / 8184 3309 / 9914 / 4873 / 2 394.3
2/3 B2 7068 / 19.000 / 19 8.00 8192 / 8184 3384 / 10139 / 4796 / 4 372.0

Mean throughput: B 404.6, A 407.6, AG 404.4 tok/s. AG versus A was -4.8% in block 1 and +3.5% in block 2. The sign flips. Rates also fall with wave position in both blocks (position means 422.7, 407.6, 386.3 tok/s). The small overall difference cannot isolate a GDN contribution, so GDN remains on K64. The earlier R8 B→AG +4.8% combined result is not used to justify retaining GDN.

C1/C4, prefill, and shared GPB=1 controls

Existing B/AG controls are reused: C4/T=16 stays on the old routes (baseline mean 327.1 tok/s; prior narrow AG mean 323.1), and the 2048-token prefill result is 3577.1 ± 53.9 vs 3580.3 ± 12.5 tok/s. The old B/AG C1 control was 154.0 vs 157.0 tok/s. A was not rerun at C1 because it does not select T=32. These are not new measurements of the A arm.

The existing full T=1..128 cold/warm curves and T=512/1024 points show no consistent GPB=1 regression. Isolated high warm medians at T=64/T=128 return near baseline in the other wave; the 512/1024 controls remain close. Raw CSVs are included in the review evidence.

Validation

  • The existing Attention eager loop covers T=31/32/33; the T=32 graph test now compares all Q/G/K/V output rows against the FP64 reference in both replay phases: 917,504 output values total, with the existing tolerance.
  • Existing targeted Attention, GDN, GDN snapshot, and GDN record tests pass 4/4. GDN T=32 eager and Record B=8/W=4 relation coverage are reused; no full Snapshot math result is claimed for B=8/W=4.
  • Existing Attention T=32 Compute Sanitizer results are reused because the kernel mapping and arithmetic did not change.
  • Existing C8 and prefill traces are reused for call shape/hotspot context. No profiled throughput is presented as official speed.
  • The C1/C4/prefill controls and GPB=1 curve data are reused; no full candidate matrix was rerun.

PR #311 remains a draft. Do not merge automatically.

@MOVIBALE MOVIBALE changed the title perf(ops): pipeline adjacent Q4/Q5 groups at T32 perf(ops): pipeline Q4/Q5 Attention groups at T32 Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant