Skip to content

cpu pool: a native layer's gate/up and down rows as one batch (STRATA_POOL_FUSED=1, opt-in) - #16

Merged
eddoursul merged 1 commit into
eddoursul:customfrom
txiki739:pool-fused
Oct 12, 2026
Merged

eddoursul merged 1 commit into
eddoursul:customfrom
txiki739:pool-fused

Conversation

@txiki739

@txiki739 txiki739 commented Oct 12, 2026 •

Copy link
Copy Markdown

What

After Hardin22/Strata-DualGPU 11b1f25 (run_fused_native)
by Francesco Albano: every expert's gate/up parts, then every expert's down parts in one phase; the thread that finishes
an expert's last gate/up part quantizes its activations, and that expert's down parts wait for it. No barrier between
the halves and no serial quantization on the host in between; the second GPU's submit still runs when the phase opens.
The same operations and bytes; the two-phase path is unchanged and stays the default.

Measured

+2-4% in every config here (six-prompt decode mean, interleaved runs). UD-IQ4_XS on the RTX 3090: 83.3-84.6 ->
85.2-86.4 tok/s; on top of the elastic K/V of this series 90.8-91.0 -> 92.8-93.0.

Where this sits (measured today on your new custom)

custom at e3727cb against our engine (your previous custom + this series + the upstream pieces you have merged
too), our configs on a Ryzen 7 5700X + 128 GB DDR4 + RTX 3090 (+ RTX 5060 Ti 16 GB), Linux. custom runs the same
configs without the flags it lacks (--kv-grow, --adapt-decay, --vram-pin-gib / --second-gpu-pin-gib):

six-prompt decode mean, two interleaved runs each custom e3727cb our engine (this series)
UD-IQ4_XS, RTX 3090 80.6 tok/s 93.7 (+16%)
UD-Q4_K_XL, RTX 3090 64.4 69.4 (+8%)
UD-IQ4_XS, RTX 3090 + RTX 5060 Ti 103.8 126.1 (+21%)
UD-Q4_K_XL, RTX 3090 + RTX 5060 Ti 78.2 92.0 (+18%)
reading an 18K prompt, both cards (UD-IQ4_XS / UD-Q4_K_XL) 2,110 / 2,010-2,270 tok/s 2,530 / 2,420
the first chat right after READY, both cards (--ple-io ram) 67.8 / 52.8 tok/s 110.9 / 85.8

The per-change measurements and the configs: README: what the changes on top of eddoursul's custom gave,
settings and how to run, examples/r7-5700x.

This series (rebased onto e3727cb)

Closed as already in custom after the 0.1.43 merge: #15 (re-split GGUFs), #17 (upstream's CPU kernels), #18 (upstream fixes).

Tested on custom at e3727cb

Smoke runs (UD-IQ4_XS, greedy, a Spanish chat answer and a code prompt, RTX 3090 or both cards): with STRATA_POOL_FUSED=1 78.8 / 85.0 -> 80.8 / 87.8 tok/s (+3%), the same tokens.

…_POOL_FUSED=1, opt-in)

After Hardin22/Strata-DualGPU 11b1f25 (run_fused_native): every expert's gate/up parts, then every expert's down
parts in one phase; the thread that finishes an expert's last gate/up part quantizes its h, and the expert's down
parts wait for it.  No barrier between the halves and no serial quantization on the host in between.  The second
GPU's submit still runs when the phase opens.  Same bytes; the two-phase path is unchanged and stays the default
(modes 5 and 6 now call the same per-expert helpers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eddoursul

Copy link
Copy Markdown
Owner

Thank you: merged into custom; pool_test --stress now runs the native formats through the fused phase too (bitwise the serial runs). On this machine it stays opt-in: time a round against the two-phase path, code / thinking / after a 16K prompt / an edit, IQ3_S -0.8 / -0.5 / -0.3 / -0.7%, UD-Q4_K_XL +2.2 / -0.2 / +0.6 / 0.0% (the pool here reads UD's experts near the RAM's rate, so the barrier is a small share of a layer).

(Measured on a Ryzen 7 9700X, 160 GB DDR5-5600, RTX 3090 + RTX 5070 Ti as the second expert tier, Windows 11; IQ3_S and UD-Q4_K_XL with this branch's configs, fixed text through --spec-follow, 2 rounds in both orders.)

eddoursul added a commit that referenced this pull request Oct 12, 2026
…e/up and down rows as one phase (STRATA_POOL_FUSED=1, opt-in)
@eddoursul
eddoursul merged commit 2b419a5 into eddoursul:custom Oct 12, 2026
txiki739 added a commit to txiki739/Strata3090-5060TI that referenced this pull request Oct 13, 2026
…ts of this machine

This branch is now eddoursul's `custom` (c4bcb6e: upstream 0.1.43 merged, and the engine work first done here merged
on 2026-10-12 as eddoursul#12-eddoursul#16 and eddoursul#19-eddoursul#21) plus this machine's documentation: the bilingual README and MEASUREMENTS, the
charts in docs/media/readme, the configs in examples/r7-5700x and examples/r9-5950x, the Spanish draft subset and the
published bench/results folders. STRATA-README.md is eddoursul's current README (and STRATA-README.es.md its Spanish
version); the README gains a section on custom before and after the merge, measured here on 2026-10-13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@txiki739
txiki739 deleted the pool-fused branch October 13, 2026 11:42
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.

2 participants