mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5406] [Engine] Arc A770 (Alchemist): scope for Alchemist-only kernel defaults (+18% decode at 8K, +16% at 32K on 0.2.11) #3229
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#3229
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?
Originally created by @aslater3 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5406
Problem
On an Arc A770 16 GB, 0.2.11 decodes at 32.6 tok/s on an 8K prompt and 28.1 tok/s on a 32K prompt. With the A770
changes from our closed PRs ported onto 0.2.11, the same runs decode at 38.6 and 32.6 tok/s. Most of those changes
switch on a kernel variant only on Alchemist: the default stays unchanged on every other card, but on the A770 it
changes. CONTRIBUTING asks for scope agreement before changing a default, so I'm asking here before reopening or
resubmitting any of them.
These PRs were closed in the 0.2.0-beta tracker reset. They have all been rebased onto 0.2.11:
https://github.com/aslater3/Strata/commits/a770/port-0.2.11 (
main9f7d977dhas the same engine code as 0.2.11).The bug fix this work found goes separately as #5405.
Measurements
Arc A770 16 GB (xe, Linux 7.0), oneAPI 2026.1, Ryzen 7 3800X, 30 GB RAM, no swap. Qwen3.8-Flash-Next IQ1_M,
--resident-experts --expert-cache auto --max-context 131072 --kv int8 --kv-resident 20480 --spec 4 --mtp,--prefill auto, greedy, 256 new tokens (8K) / 128 (32K). Same day, alternating builds, a discarded JIT warm-upper build.
The output tokens vary from run to run on every build, 0.2.11 included, because MTP drafting and the adaptive
tier make the run non-deterministic. So these runs are not a token-for-token comparison. The kernel changes were
checked with their parity tests, which pass on the A770, and the commits marked "bitwise" give identical results.
11 of the parity tests need
OverrideDefaultFP64Settings=1 IGC_EnableDPEmulation=1on Alchemist, because theirreferences use fp64.
Switching one change off at a time (8K, 2 runs each, against 38.58 with all four on): router/QSA top-k large GRF
37.81, split GDN 37.92, expert large GRF 38.07,
STRATA_POOL_FUSED38.16. Each one is inside the run-to-run noise ofabout ±1 tok/s. Together they are +2.7 tok/s (35.88 → 38.58).
The changes, and what I'd propose
The Alchemist gate is
intel_gpu_gen(dev) == IntelGpuGen::Alchemist. Each change has its own switch to turn it off:STRATA_ARENA_SEGMENTED,STRATA_ATTN_BATCH,STRATA_GR_*,STRATA_GDN_LARGE_GRF/STRATA_GDN_SPLIT,STRATA_EXPERT_LARGE_GRF,STRATA_SMALL_LARGE_GRF.Two findings for the maintainers
1. Chunked pinning works as intended but has a mixed end-to-end effect today. On the A770 one pinned allocation
of 4 GiB or more is refused, so the resident copy falls back to
mlock. Same day onmain, 8K, 5 runs without itand 4 with it:
The prompt is 3% slower in every run. In October, with more free RAM, the same change measured +1.6% on the prompt.
So I'm not proposing it as a default without a maintainer's view.
2. When RAM is short, the prompt loan is refilled from the files. If the RAM budget can't hold the whole
complement,
pin_cache_complementdrops the lend region (lend_from_slot = -1). Every lent slot is then re-read fromthe GGUF after every prompt: 1,737 slots (3.29 GiB) in 5.0–5.5 s on this machine, which is a third of an 8K prompt's
time. It is the cause of a 35% drop in our prompt speed after we turned swap off, because the RAM available fell
below the complement plus the loan. I tried an opt-in reserve
(6fa6b26c,
STRATA_RESIDENT_LEND_FIRST=1, withSTRATA_RESIDENT_LEND_GIBas a cap). It trades prompt speed for decode speed almost linearly:At 32K, with the whole loan reserved, the prompt goes 627 → 692 and decode 30.2 → 29.1. I don't think this should
change a default. It may be worth an opt-in for prompt-heavy workloads, or a line in the docs next to the existing
#1389 warning. Your call.
Questions
be opt-in?
Not tested: Battlemage, i915, Windows. CUDA and HIP are not affected, except by the CPU pool change, which would stay
opt-in.