Pure deletions (own-stack 0.2.15, deletable now); the SYCL build does not change.
- sycl/src/prefill/moe_mmq.dp.cpp, ggml_cuda_host.dp.cpp: llama.cpp's MMQ port; not in sycl/CMakeLists.txt,
and they include mmq.cuh / common.cuh, which no SYCL include path has.
- sycl/src/prefill/moe_fused.dp.cpp, moe_fused_iq.dp.cpp: not compiled; moe_fused_stub.cpp takes their place
(sycl/CMakeLists.txt, "upstream's fused int8 kernels: not built here").
- sycl/third_party/ggml: the copy of the quant header that dpct writes (sycl/tools/migrate.sh reads the repo's
third_party/ggml and writes a migrated copy under <out>/third_party/ggml). The SYCL build includes
${STRATA_ROOT}/third_party/ggml; nothing read the copy. migrate.sh says so in a comment.
- data/settings-register.json: the seven reads in the two deleted fused files removed, and "sycl" from the
backends of the five settings only those files read (STRATA_PF_FUSED, _KQ, _NATIVE, _TILE, STRATA_PF_OCC).
The rest of the register is left as it was (a full regenerate also moves hundreds of stale line numbers).
docs/SETTINGS.md: "Intel Arc" off the two rows of those settings that named it.
- tools/test_quant_header_names.py, third_party/strata-ggml/UPSTREAM.md: follow the deleted copy.
The note of the kill switch named the unregistered expert arena among the changes for gfx1103, gfx1150 and gfx1151. Since
the owner's decision (by 11:05 on 11-15) that arena default is on gfx1103 only, so the note says so. Only that note changes.
The note now says "the Radeon 780M class (gfx1103)" instead of "an integrated gfx11 GPU", after the owner's decision (by
11:05 on 11-15) that the unregistered arena is the default on gfx1103 only. Only that note changes.
settings_register.py --check: exit 0 (p1004).
data/settings-register.json gets the five engine settings that were
missing from the register (tools/settings_register.py --check failed on
them):
- STRATA_PF_TQ_G1151 (default, prefill): the fused prompt kernels on
Windows gfx1151 take Gyro-S's trellis experts in a build without MMQ.
- STRATA_KFD_QUIET, STRATA_KFD_QUIET_XFER, STRATA_KFD_QUIET_NOREG,
STRATA_KFD_QUIET_LEND (research, core): the KFD-quiet changes on an
integrated gfx11 GPU under Linux and their single switches.
All five are for A/B runs only, not for users. The owner approved the
entries as drafted on 11-15.
The file was written by the tool's own run, so the five new entries carry
the commit, date and release fields the tool fills, and the automatic
fields of other entries (read lines, doc mentions, last commit) follow the
current sources; no hand-kept field of another entry changes. Status,
owner and note of the five were set by hand.
Data only: no packaged engine or launcher code changes, and
docs/SETTINGS.md is unchanged.
p1a_pack() keeps one answer for the whole run: a debug build asserts when a
later H sizing sees a different answer than the first (a plan made before
the expert layout was loaded). The expert layout is loaded in main ahead of
every bytes_needed call and every Prefill::init. A smaller H is never
written past: experts_native takes the P1A kernels only when the FP16 rows
fit in the H that Prefill::init carved, and runs today's kernels otherwise.
STRATA_PF_P1A_L2 is read only in HIP builds, like STRATA_PF_P1A; the
settings register and the settings page list it for AMD.
src/core/arch_defaults.cpp: STRATA_PF_P1A=1 joins the Windows gfx1151 table.
Measured on that chip with UD-Q4_K_XL, 5 interleaved pairs: prompt x1.046
(4K), x1.043 (8K), x1.043 (32K), decode unchanged. KL to the FP16 truth,
24 prompts a size: on 0.0112 / 0.0116 against off 0.0179 / 0.0118 at
4K / 8K. A value the user sets wins, so STRATA_PF_P1A=0 turns it off.
Every other card and system keeps its table.
H grows to FP16 rows only when a layer of the loaded pack takes the P1A
kernels (p1a_takes_pair), so a pack with none allocates what it did before.
The start-up line keeps its wording and is not printed when no layer takes
the P1A kernels.
The settings register lists STRATA_PF_P1A and STRATA_PF_P1A_L2; the
settings page is regenerated.
On sm_75 the fused expert kernels already compiled for every format, but only
the Q2_0 pair was set up there. In a build without MMQ, where the Turing set
(STRATA_PF_FUSED_SM75) is on by default, they now also take the IQ3_S gate/up
with an IQ4_NL or Q2_0 down, and the other i-quant gate/up formats (IQ2_S,
IQ3_XXS, IQ4_XS, IQ2_XXS, IQ2_XS). A tile rule picks the 128-row instance
above 56 rows an expert for the i-quant gate/up, and an instance whose shared
memory does not fit the card's 64 KB is not set up.
pf_wmma_parity skips, with its reason, the formats whose tile needs more shared
memory than the card allows. The spill baseline lists the known sm_75
instances.
Cards other than Turing and a build with MMQ are unchanged.
No user text changes.
Without a vision.elastic_mib of the user's own, the server asked the expert
cache to keep a fixed 2,048 MiB free for the picture reader. At
vision.max_tokens 16384 the reader needs up to 3,674 MiB, and on an RTX A6000
one 3200x1910 picture failed with "the vision encoder failed (GPU memory: out
of memory)". The ask is now the config's elastic_mib when set, otherwise what
the reader needs at its token limit, and never less than 2,048 MiB: 2,048 at
the default limit of 1,024 tokens, 3,674 at 16,384 tokens or with no limit.
docs/DETAILS.md and docs/VRAM_ELASTIC.md say so.
No user text changes in the engine.
The switch from the two commits before this one had no register entry, so
tools/test_settings_register.py refused it ("entries without a valid
status"). The entry is generated by tools/settings_register.py; its hand
fields are set like STRATA_NUMA_POOL's: status rollback, owner kernels/cpu,
and a note on what the default and =0 do. docs/SETTINGS.md is not
regenerated here.
DETAILS.md and VRAM_ELASTIC.md said elastic_mib defaults to 2048. Without
the key the ask is now 2,048 MiB at the default picture limit and, from a
limit of about 4,700 tokens up, the reader's estimated need at that limit
(3,674 MiB at 16,384 or with no limit).
Register regenerated: four read lines of serve/server.py moved by the
previous commit.
The register entry is now status rollback with a note per backend, and docs/TROUBLESHOOTING.md says which cards have it on by default.
The settings page was regenerated and picks up one row that was missing (STRATA_MEM_CREDIT_INACTIVE).
Inside a container with a memory limit below the machine's RAM:
- the memory guard counts reclaimable file cache (active and inactive, less
dirty pages and the engine's own mapped file pages) as available, so it no
longer stops or shrinks a run that fits;
- the expert arena's RAM check no longer counts shared memory as free;
- setup reads the container's memory limit and compares RAM and the expert
arena in one unit when it picks the low-RAM line; the Terminal tools read
the same limit as the RAM size.
Outside a container, with a limit at or above the machine's RAM, or with
--memory-limit-mib, nothing changes. STRATA_MEM_CREDIT_INACTIVE=1 brings back
the old inactive-only credit.
The settings register was merged by hand (the new switch added, every other
entry as on this branch) and is regenerated in the next commit.
Brings the sm_75 fused prompt kernels for the i-quant gate/up pairs
(IQ3_S, IQ2_S, IQ3_XXS, IQ4_XS, IQ2_XXS, IQ2_XS gate/up with IQ4_NL or
Q2_0 down; STRATA_PF_FUSED_SM75_IQ=0 turns them off) onto the base that
added the NVFP4 fused kernels.
Two conflicts:
- src/prefill/moe_fused_iq.cu: both sides ended the same list of type
constants. Kept the base's list, which now ends with T_NVFP4, and put
the Turing block (t75_slot, t75_bit, kT75Formats) after it. The lines
the merge adds to this file against the base are exactly the lines the
Turing commits added against their own base.
- data/settings-register.json: every conflict was a generated "line"
field. Took one side, then regenerated the register; --check passes
and the register test passes.
What an NVFP4 expert does on a Turing card, before and after the merge
(line numbers are the merged file's):
- dev_info() (2426-2443): on sm_75 it returns from the Turing block
before the NVFP4 kernels are set up (2502-2508), so d.nvfp4 stays
false there. This was already the case in the base; the merge only
adds the i-quant set-up calls inside that block, and NVFP4 has no
Turing slot (t75_slot gives -1, so t75_bit is 0).
- native_supported() (2918-2921): the NVFP4 clause returns before the
new Turing pair check (3009) is reached, and it asks for d.nvfp4 and
!d.t75, so it answers false on Turing, as in the base.
- gu_covered() (2570) answers false for NVFP4 on Turing, as in the base,
so experts_native() would refuse the pair at its first check (3049)
in either tree; the added t75_missing term does not change that.
So on sm_75 an NVFP4 layer never takes the fused kernels, before or
after the merge, and it goes down the same prompt path as in the base:
prefill.cpp, which picks that path, is the base's file unchanged. No
Turing-only branch sits in front of the NVFP4 path.
This reverts commit 667533760d.
Measured in a 57.7 GiB container (RTX 4090, IQ3_S, two starts each way):
with STRATA_ARENA_OWN_MAPPED=1 the arena check read about 27 GiB where
the memory guard read 56.8, waited 80 s, warned of a shortfall, and then
loaded the same arena as without it. Refaults and the PLE table's
resident pages were in the same range both ways and prompt time was
level. The switch was off by default, so the default path is unchanged;
the settings register is regenerated without it.
STRATA_MEM_CREDIT_INACTIVE (rollback to the inactive-only file cache
credit) and STRATA_ARENA_OWN_MAPPED (off by default) are now in
data/settings-register.json. Regenerated with tools/settings_register.py,
which also refreshes the recorded line numbers of other reads.
The previous commit let the plain pack keep its own floor of 64 tokens when the CPU share is armed. Measured on an RTX 5070 on PCIe 4.0 x16 that floor is wrong on a
discrete card: 64 was measured on an integrated GPU, where streaming costs nothing. On a discrete card a floor of 64 streams every non-resident expert for every chunk,
a flat cost of about 1.27 s, so a 256-token prompt takes 1,224 ms against 590 ms with MMQ (2.07 times) and a 1,000-token prompt 1,252 against 1,050 ms. The staged FP16
path grows by about 0.41 ms a token, so the two cross near 1,420 tokens; from 1,800 tokens the streamed walk is faster than the build with MMQ (0.93 times; 3,000 tokens
0.78 times). A floor of 1,024 loses 8 percent at 1,200 tokens.
The rule now lives in one place (plain_floor_rule.hpp): the plain pack in a build without MMQ on a discrete CUDA card that has answered takes 1,536 tokens, with or without
the CPU share. Integrated cards, a card not asked yet, HIP builds, the native packs and the build with MMQ keep the old answer. Only one discrete card was measured.
STRATA_PF_PLAIN_FLOOR=0 restores the old answer on every class. The unit test covers every class and both share states. Settings register and SETTINGS.md regenerated.
With the CPU share armed (chunks up to 3,072 tokens by default on a CUDA card) stream_all_min() is the share's limit instead of the default floor. The share
takes experts of a native pack only (cpu_maybe needs lay.native), so on the plain Q2_0 pack (the pack setup builds on a CPU with AVX-512) it takes nothing, but its
limit still replaced that pack's own floor of 64 tokens in a build without MMQ. Chunks of 64 to 3,072 tokens then took the staged walk, which has neither the
staged fused entry nor the int8 kernels for that layout and runs each routed expert on the dequantize + FP16 path: the 1,567-token tail chunk of a 20,000-token
prompt, 7.7 percent slower than the build with MMQ on an RTX 5070. The tail buffers of the FP16 path were also sized for 3,071 tokens, which made the automatic
chunk smaller (9,216 against 10,496 with the share off).
The rule is a small pure header (plain_floor_rule.hpp) with a unit test. A build with MMQ and the native packs are unchanged. STRATA_PF_PLAIN_FLOOR=0 restores the
old rule. Settings register and SETTINGS.md regenerated.
Only the line numbers of the reads moved (data/settings-register.json). The one
new setting (STRATA_PF_SHARE_OWN) already has its status, owner and note from the
f-i8-share branch (copied into the merge commit). docs/SETTINGS.md unchanged by the
regeneration; tools/test_settings_register.py 8 passed, settings_register.py --check
exits 0.
The previous register commit gave the 54 settings that only the Intel engine reads
(30 STRATA_SYCL_*, 24 STRATA_PRIVATE_*) a placeholder note. Each note now says what
the code does at its first read (file:line), whether it is opt-in (=1 or a number,
off by default) or on by default. The six that the code turns on unless set to 0
(STRATA_SYCL_IQ4_LOOKUP, IQ4_PAIR_REUSE, IQ4_Q8_SPLIT, Q2_WORD_EXPAND,
QSA_CHUNK_DOWN, QSA_VALUE8_K8_VEC) get status rollback; the other 48 stay research.
STRATA_SYCL_Q2_WORD_EXPAND: default on, sycl/src/kernels/cuda/iq_kernels.dp.cpp:3706-3709.
docs/SETTINGS.md is regenerated: the "Switches that go back to earlier behaviour"
section grows from 70 to 76 rows (the six above). Described from the code only,
nothing measured. test_settings_register 8 passed, settings_register.py --check
exits 0, docs step passed.
Only the line numbers of the reads moved (data/settings-register.json, 280 lines);
the hand-kept fields are unchanged, docs/SETTINGS.md is unchanged by the
regeneration, tools/test_settings_register.py 8 passed, settings_register.py
--check exits 0. The 54 Intel-engine entries added in the previous register
commit stay (STRATA_SYCL_TLA_ATTN included).
prefill.cpp: the two adjacent inserts (share_keeps_own_kernels and the switch-point globals) are both kept.
Settings register and docs/SETTINGS.md regenerated (the way-back count is 71).
The merge of f-sycl-prs brought 30 STRATA_SYCL_* and 24 STRATA_PRIVATE_* settings
read by sycl/src that the register did not list; tools/test_settings_register.py
test_engine_reads_nothing_unregistered and the docs step "settings register"
failed on the candidate (p1004, py-tools and docs). The register is regenerated
(tools/settings_register.py; the line numbers of the reads moved with the merge)
and the 54 new entries get status research, owner sycl and a note that says lane
SYCL-PR confirms the meaning, default and final status. docs/SETTINGS.md is
unchanged by the regeneration. test_settings_register: 8 passed.
One conflict, in src/qwen35/q36_engine.cu (the start block that sets
STRATA_PF_FUSED=1 in a build without MMQ). Batch 15 carries the same change
as the cherry-pick ced106040 (f331970d9), but wrapped in
#if !defined(__HIPCC__) with a plain `if (!MMQ::built())` body. This branch
runs the block on HIP too and takes the value through
fused_tile::q36_start_env(MMQ::built(), pf_env), so the branch's version
wins in both hunks: the #if / #endif pair is dropped and the HIP comment line
stays. The file has no other difference from the branch tip. Everything else
from batch 15 (CMakeLists.txt, data/settings-register.json and the other
files) merged without a conflict.
The merge of f-draft-costs added two settings read by src/program/generate.cpp
(STRATA_DRAFT_COSTS_LEARN, STRATA_WINDOW_WARM) with empty hand fields in the
regenerated register; tools/test_settings_register.py
test_every_entry_has_a_valid_status failed on the batch 15 head (p1004,
py-tools: 1 failed, 1600 passed). Both are research / harness switches.
The branch is f71bd0394 plus f331970d9, which is already in it. It changes only builds without llama.cpp's MMQ prompt kernels; a build with MMQ keeps its defaults. The merge is clean.
CUDA and HIP keep live costs, so a start with no table runs as before; "draft_costs": true in a config turns the table on anywhere. The branch also brings the passive learner of the table and the lookup-window statistic. The only conflict is data/settings-register.json (both sides add entries); both are kept and docs/SETTINGS.md is regenerated from the register.
The branch contains f-tail-loan (dd404b382, the prompt loan sized for the tail) and f-switch-point2; the default itself is one commit. The conflicts are mechanical: a test block in CMakeLists.txt (both sides keep their tests) and the generated docs/SETTINGS.md, regenerated from data/settings-register.json.
With the CPU share armed (chunks up to 3,072 tokens by default on a CUDA card) a layer where the CPU takes experts left both the staged fused
entry and the int8 kernels, because both asked for rows_cpu == 0. In a build with MMQ that layer runs MMQ's groups; in a build without MMQ the
GPU's experts of it ran on the FP16 path, which made a 2,049-token prompt 12 to 18 percent slower than the build with MMQ on an RTX A4000.
Neither path needs the condition. The share carves the CPU experts' rows out as the last block of the layer's rows, rows_local is already net
of them, `order` leaves them out, and the entry's and the kernels' row counts, bounds, scratch and destinations come from order / off / cnt;
T * K only bounds the tile count of the staged entry. The CPU's rows are written into Dm after the walk and never by the GPU.
The rule is a small pure header (share_own_rule.hpp) with a unit test: no CPU rows keeps the old answer, a build without MMQ keeps its kernels, a
build with MMQ is unchanged (compile-time). STRATA_PF_SHARE_OWN=0 is the old rule everywhere, =1 the new one in a build with MMQ too.
Settings register and SETTINGS.md regenerated.
In a build without llama.cpp's MMQ the CUDA list switches on STRATA_PF_FUSED_Q8D,
_Q8GU, _Q6K and _TQ by itself; the HIP list had only STRATA_PF_FUSED, _Q50 and _KQ,
so Q8_0, Q6_K and Gyro trellis layers fell to the FP16 path on gfx12 although the
kernels exist and were gated there. The four names are added to the HIP list.
Every reader of those four switches on HIP checks for gfx12 first, so gfx11
cards keep the rules they have.
The register notes of the four switches say they are on by default in a build
without MMQ (a value the user sets is kept). No new setting.
One layer on a Radeon AI PRO R9700, fused kernels against the MMQ path at 2,048 /
8,192 tokens: Q8_0 / Q8_0 4.2x / 3.1x, Q6_K + Q8_0 3.3x / 2.3x, IQ3_S with a Q8_0 down
3.7x / 2.6x, Gyro-S pair 3.3x / 1.5x, Gyro-M pair 3.3x / 1.5x. Not run on a full model.
strata-q36 chose per layer between the fused kernels and MMQ; a layer with neither sent
every prompt chunk to the grouped kernels (about 0.35-0.40 of MMQ on a Tesla P100) and,
in the hybrid layout, the big chunks to the CPU pool. A build without llama.cpp's MMQ,
and every layer MMQ has no tile for, now take native_expert_i8 as the third route.
The rule is a header (q36_prompt_route.hpp, unit test q36_prompt_route_test): fused
kernels, then int8 when STRATA_EXPERT_I8=1, then MMQ, then int8 when the switch is not 0,
then the grouped kernels. An unset switch reads as 1 in a build without MMQ; the engine
tells the kernel library itself because the standalone binary does not link the prompt
code's start-up list. A chunk whose experts average fewer rows than the few-rows limit
takes the grouped kernels. In the hybrid layout the int8 layers stream their experts
through the same ring as the MMQ layers. The start-up line names the layers per route.
A build with MMQ and nothing set is unchanged: fused where covered, else MMQ.
The prompt path now picks, per card, the chunk size from which every expert
the card does not hold is streamed (the floor), and sets the CPU share's
limit to 1.6 times it. It is on with nothing set for one class of card: CUDA,
NVIDIA discrete on PCIe, a single GPU, the start-up link probe ran, compute
capability 8.6. Every other card keeps the fixed 1,024 floor and the fixed
share limit.
STRATA_SWITCH_POINT=0 turns it off; STRATA_SWITCH_POINT=1 asks for it on any
other CUDA card. An explicit STRATA_PREFILL_STREAM_MIN or
STRATA_PREFILL_CPU_SHARE_MAX still wins over the rule.
On an RTX A6000 (UD-Q4_K_XL) the floor is 3,584 and the limit 5,632 against
1,024 and 3,072. With the tail-sized loan in the same build the rule equals
the old default above its limit.
The start-up line no longer calls the rule an opt-in and is printed only when
the floor moved. The rule's unit test covers the class (and every compute
capability, multi-GPU, no probe, integrated and HIP outside it) and the
variable. The settings register entry becomes a rollback switch.
The branch carries the int8 expert kernels and the rules for a build made with -DSTRATA_MMQ=OFF (HIP without STRATA_PREFILL_MMQ); the build with MMQ is meant to stay as it was. Order of what a build without MMQ runs for the prompt, nothing set: the fused kernels for a chunk of 1,024 tokens or more on every layer they cover; the staged fused entry for shorter chunks; the int8 expert kernels (gate/up Q4_K, Q5_K, Q6_K, IQ4_XS, IQ1_M, Q2_0 and the matching downs, tile-2 slices of 8, a few-rows route) for what nothing faster covers; the FP16 path for the rest. On a Tesla P100 the int8 kernels run only below the stream floor and the FP16 path from the floor up. FP16 expert buffers are sized for the tail in a fused layout, and the build prints one statement at start-up about what its prompt kernels are. A set STRATA_EXPERT_I8 still wins at every size.
Measured without MMQ against with MMQ, nothing set (prompt ms): R9700 at 1,000 tokens 936 -> 735, at 2,048 1,146 -> 1,151; RTX PRO 5000 within 1% at every size with the first logits byte-identical; Tesla P100 at 1,000 tokens 5,079 -> 4,267, equal from the floor up. The branch had merged an earlier integration head (3ffa59e2b) and now sits on the batch 14 head.
srv118 JSON lost 2.4 % (10 of 12 pairs) with the passive table. A/B with hand-edited copies of the table as taken over (par/dc/w5c): the cause was the real price of 2 rows, 20.08 ms instead of about 8.3. The old "more rows never cost less" pass only raised: that one price became the price of every size from 2 to 7 rows and the policy took 12-row windows. Setting 2 rows to 8.5 ms brought the window counts and the speed back (JSON +2.4 % against off), setting sizes 7-12 to the earlier values did not.
- A size's real price is now the median of its 16 collected rounds (CalAcc keeps the rounds, "cal b t n sum v1..vn" in the file; a line without them keeps the mean). A cold first-use round, a stall or another process no longer moves it.
- The guard in apply_table lowers from the trusted side: a guessed size, or a real size below another real size, is lowered to the price of the next larger size first; a real size above an unreached next size is kept and that guess is lifted to it. The Q2_0 4-row / 5-row and the IQ3_S 4-row / 5-row inversions of the taken-over files and the srv118 2-row outlier are fixtures of the unit test (179 of 179).
- The window warm-up (one dummy verify window per allowed width, then session_zero) now runs before the READY line, from the options (lookup_size_mask), single-stage serve without --batch.
A window width builds its graph / pipeline on its first run. A width the policy first picks inside a long request paid that cost there: on the M5 Max with IQ3_S the first five-row lookup round cost 37 ms instead of 25 ms in 5 of 8 launches of the table arm, because the release and the live costs happen to run one five-row round in the first (untimed) request.
serve now runs one dummy window per allowed width 1..S before the first request is read, then session_zero() as a request that reuses nothing does; no checkpoint, conversation entry, RNG draw, policy sample or statistic is touched. Single-stage, non-batch, non-pipelined serve only. STRATA_WINDOW_WARM=0 turns it off (research switch, in the settings register). The engine prints the ms of every width and the total.
The load line of a table that is in use but still collects sizes no longer says "not used yet" (policy.table_held() picks the text).