On a Radeon 780M (gfx1103) under Linux the engine registered its 31.6 GiB expert arena and asked for transparent
huge pages on it whenever enough free 2 MiB blocks existed. Huge-page compaction and collapse inside a registered
range invalidate it; KFD then evicts the process's queues, and the gc 11 MES firmware resets the GPU when a dispatch
sits in a barrier. The prompt then ends in "unspecified launch failure". One Radeon 780M box (Q2_0 pack, Linux kernel 7.0), one engine at a
time: huge pages requested in 9 starts, 8 failed in the first prompt; not requested in 3 starts, 3 ran.
Setup already wrote STRATA_NO_ARENA_THP=1 for its 780M opt-in. This makes it the engine's own rule, detected from
the device (integrated, and gfx1103, gfx1150 or gfx1151), on Linux only. No new setting: STRATA_NO_ARENA_THP unset
lets the engine decide (this rule, and every other device as before); any value but 0 skips the request as before;
0 now asks for the huge pages, also on these GPUs (it used to skip them like any other value). The SYCL arena reads
the variable the same way. Windows and discrete cards are unchanged. The arena line's new ending is a [DRAFT] for
the owner's wording. Unit test: arch_defaults_test (the device rule and the variable's three states).
Conflicts (each resolved by keeping both sides):
- .gitattributes: f-own-1b's LF rules for third_party/strata-gguf-py and
third_party/strata-llama, and main's *.jinja LF rule.
- packaging/build_cuda_linux.sh: f-own-1b's optional STRATA_GGML_DIR
override ($ggml) and main's shape_setup line; the cmake line is
$ggml ${STRATA_CMAKE_EXTRA:-} $shape_cmake (no third_party/llama.cpp path).
- packaging/build_hip_linux.sh: ${GGML[@]+...} (the optional override) plus
main's $shape_cmake.
- spark/build_engine.sh: $ggml plus main's ${STRATA_CMAKE_EXTRA:-} $shape_cmake.
packaging/build_sycl_linux.sh, setup.py and tools/test_setup_choices.py
merged by themselves.
src/core/mtp.cpp and sycl/src/core/mtp.cpp: the two ggml calls of make_q4_dense / make_q4_head (to_float of the Q8_0 projections and of the draft head's
format, ggml_quantize_chunk(Q4_0) without an imatrix) go through two small local helpers. With STRATA_OWN_CPU_QUANT they are
strata::quant::dequant_row and quantize_q4_0_ref (ggml's dequantize_row_* and quantize_row_q4_0_ref, ported), otherwise ggml-base as before. The Q4_0
bytes are the same by construction and checked by tests/quant/quant_parity (quantize_q4_0_ref against ggml_quantize_chunk(Q4_0), dequant_row against
to_float for 22 types, bit for bit). The STRATA_MTP_Q4 macro replaces STRATA_NATIVE_EXPERTS as the availability guard, so a build without ggml-cpu
still has --mtp-q4. The CMake define that selects the layer comes with the pool switch in the next commit; until then both files build the ggml path.
qsa_real_shapes() (24 / 2 / 256 / 64, indexer 4 x 128) is the shape every QSA parity program builds from; it now reads kCompiledGeometry (the same values for the default build), so the
q4_* builds' kv_stream / qsa_prompt_attn / snapshot checks run at their own head counts instead of being refused. gdn_parity's prefill cases used 48 value heads; native_grouped_parity's
compiled-shape loop no longer asks the K-quant checker for an IQ4_NL down.
gr_parity, gr_multi_parity, cvec_parity used 2560 / 4 / 320, gdn_parity 128 / 16 / 48 and 2560, s2_expert_grouped_parity 2560 x 640 (and a blob-size assert for that shape only): they now read
kCompiledGeometry, so the q4_lite / q4_mid / q4_big builds check their own kernels (the values for the default build are the ones they had). native_expert_parity reads
Q4KQ_PARITY_EMBD / Q4KQ_PARITY_FF as the CUDA tree's test does; native_grouped_parity adds the build's hidden width to the K-quant down widths and, for a build that is not
Flash-Next's, the UD mix's pairs at the build's own expert shape.
The three kernels had 24 query heads (and the launcher's ld16 default and block counts T x 24 x 256) written in. The CUDA prompt path takes the fused rms_rope_rows route and keeps these only for
STRATA_QSA_FUSE_NR=0; this port has no fused route, so at 16 or 32 heads they would have mixed the heads up silently.
verify.cpp and remote_experts.cpp refused k != 10 (the verifier would not start at top-8); generate.cpp had two layer-index checks against 48 and a 2560-float buffer for the
PLE probe. verify.cpp also gets src/core/verify.cpp's STRATA_LOGITS_DUMP debug tap (off unless set), which the logits judge reads.
prefill.cpp: N, HC, LR, K, NE, C, ZV, HV from kCompiledGeometry and the loose literals (1280 / 640 / 2560 expert and hidden widths, 12288 / 512 / 128 attention and
indexer widths, the 24 and 2 head counts) became the named widths src/prefill/prefill.cpp uses (kFF, kFF2, kEmbd, kQW, kQFull, kKvW, kIdx*).
kernels.dp.cpp: N, HC, LR, S, HK, HV, C from the geometry; the router, combine and SwiGLU kernels use KU (top-k) and FFC (expert width). The Q2_0 blob dequantisers keep
Flash-Next's layout (Q2_0 packs only).
gdn_xe.hpp: the Xe GDN recurrence (default on for Alchemist) had its own copy of 128 / 16 / 48 / 10240 with no assert: it now reads the geometry.
moe_fused / moe_fused_iq: the fused expert kernels are Flash-Next's 2560 x 640 and now decline any other compiled shape instead of mis-running.
For the default geometry every value is the one it replaces.
native_ple_postops (N, H), ple (the native key's geometry assert now says what the kernel needs), native_moe (the combine's rank count KU = n_expert_used, 10 for
Flash-Next; the vec4 fast path is taken when k == KU) and s2_expert_grouped (H, FF) follow core/geometry.hpp, as src/kernels/cuda does since the geometry work.
G = n_head / n_head_kv replaces the literal 12 in qsa_decode_attn, qsa_prompt_attn, qsa_prompt_attn_xmx and qsa_prompt_attn_esimd (the static_asserts that stopped
every shape but Flash-Next). The kernels already index by G (the decode kernel's float4 probability rows and 16-lane score reduce need G % 4 == 0 and G <= 16; the prompt
kernels pad the query rows to 16), so 8 (q4_lite) and 16 (q4_mid, q4_big) compile as they are. The decode kernel's q8_v3 / pre-sm_75 variants that the CUDA side
generalised do not exist in this port.
N, HC and LR come from core/geometry.hpp (the static_assert that stopped q4_lite / q4_mid / q4_big is gone); the plain read's tile is N (N / 2 for the staged tile), the
literal 2560 / 1280 template arguments and tile choices became N and N / 2, as in src/kernels/cuda/fused_gr.cu. The single-token down kernel's hidden row (D floats)
no longer fits 48 KB at hidden 3072 and up: fused_gr_read then takes the multi-token read of one token (bitwise the same read, the default path already).
The Q8_0 read fixes of the CUDA side (chunk width from n_embd, up-row steps from hc_lr) have no counterpart here: this file has no Q8_0 read.
sycl/tools/fixups.py: the kernel-name fixup also accepts the tile spelled N or (N / 2), so a re-migration of the CUDA source keeps working.
STRATA_PF_HASH_FILE: per row hashes of the first GDN layer's stages in the prompt path. STRATA_LAYER_HASH_FILE: per layer hashes of the payload the host sees for the CPU experts and of their output. STRATA_STATE_HASH_FILE / STRATA_STATE_DUMP: hashes (and a raw dump of the first four layers) of the GDN states and filled int8 KV before a window. They found the oneMKL bf16 GEMM repeatability problem fixed in the previous commit.
On the Arc A750 the same prompt gave different tokens on different runs. The first thing that differs is the ssm_alpha / ssm_beta projection (48 outputs) of the first GDN layer: oneMKL's bf16 GEMM returns a different result on every launch for M=48,T=86,K=2560 and M=4,T=86,K=10240 (the hyper-connection inject), also at T=1..8 for M<=64 and at T<128-160 for those M and K. The GDN state then differs in every layer, the first decode window's logits differ by 0.1-0.7, and a near-tie flips a token.
Gemm::bf16 now runs outputs <= 64 on a 16-lane sub-group kernel with a fixed accumulation order (repeatable; 3-36x faster than oneMKL on the shapes tried, standalone; max abs error 1.6e-5 on sums of scale 90). STRATA_SYCL_BF16_DET=0 gives the oneMKL call back, =2 uses the kernel for every output count. Registered as a rollback switch.
STRATA_D_FMTS had no K-quant: a UD file at an expert width divisible by 256
(Qwen3.6's UD-Q4_K_XL, 2048 x 512, Q5_K / Q6_K downs) was refused by
native_expert_supported on Intel Arc, as the CUDA list has not been since it
took Q5_K (Q6_K with STRATA_Q6K_EXPERTS). The lane kernels are the gate/up's
(Fmt / KqSplit of 13 and 14); no kernel code changed, two list entries.
native_grouped_parity: --kqdown (K-quant gate/up x Q5_K/Q6_K down at hidden
2048/2560 x width 512/1024: split vs per-entry bitwise, GPU vs CPU reference),
also run by default; --hash (output checksums of the grouped call for every
pair of today's sets, to compare a build before and after a kernel change).
Removes the aligned weight-load prefetch kernel of the wide Q6_K mmvq and the
SIMD16 sub-group variants of the decode mmvq (sycl/src/kernels/cuda/native_mmvq.dp.cpp).
Both measured no gain in the engine (PF=2/3/4/6 slower everywhere; no SG value beats
SIMD32 beyond noise). Default settings run the same kernels as before. The register
marks both retired in 0.2.13 and the line numbers of the register are rescanned.
iq_kernels.dp.cpp: the 997-line AMD-tuned S26/S27 grouped-expert block
(canonical code: src/kernels/cuda/iq_kernels.cu).
native_qsa_score.dp.cpp: the 38-line inline-PTX load_a/load_b/mma block
(canonical: src/kernels/cuda/native_qsa_score.cu; the port scores with the
scalar path).
generate.cpp: the 28-line #542 CUDA-runtime mismatch warning (canonical:
src/program/generate.cpp).
Each leaves a one-line comment. sycl/tools/fixups.py gets entry 14, which
removes the same regions after a re-migration (idempotent, depth-aware), and
the comments that named sycl/migrate.sh now name sycl/tools/migrate.sh.
Prompt-path block scores in single-pass TF32 with a per-block error bound,
3xTF32 rescoring only near each query's top-k cut-off, so qsa_block_topk
returns the same cells in the same order, ties included. Off unless the
variable is set; says once where it cannot run (HIP, Metal, SYCL, layer-major
path). Adds qsa_two_pass_test, qsa_two_pass_status_test and the GPU parity
test qsa_two_pass_parity.
Ported from PR 4119 (bitaccesscomau); the log line of the per-prompt counters
is shortened without dropping a field.
l620 (sm_120, IQ3_S), greedy ids identical off vs on in every pair:
prompt 128K +1.65% (n=12), 256K +4.10% (n=8), 32K -0.14% (noise).
(cherry picked from commit bbf7c55f1351d913233250fe7869642f7c2b98a1)
vec_dot_q5_0_q8_1 used the q8_1 block's ds.y (the sum of the original activations). With the SwiGLU outputs (not zero-mean) the whole-expert error with Q5_0 down was 2.1e-2 .. 3.1e-2 against 1.2e-2 for every other down type. Now 1.2e-2, and the GPU agrees with the CPU path. The Q5_0 parity limit is tightened to 1.8e-2.
native_expert_parity: --bench decode micro-number, +0/-0 is no fp16 difference.
Registers every gate/up x down pair of the new sets (CUDA and HIP, SYCL), a dense type test
(native_dense_types_parity), Q5_0 down in native_grouped_parity, new-set types in the MMQ screen,
and a --synthetic mode in the SYCL native_expert_parity.
drafting.DRAFTER_MIB gains dflash2_selq4 (715); drafting.vram_gb(data_dir, engine) gives the true figure (an engine program that carries 'selector codebooks: Q4_0 rows' and a Q4_0 pack that setup / Load converts), strata drafting plan reports vram_gb and selq4 and its text says the same number, Control passes capabilities.dflash2Selq4 to the page and the fit (apps/host/src/lib/native-fit.ts DFLASH2_SELQ4_VRAM_GB, apps/host/server/native-parallel.mjs) uses it; apps/host/tests/drafting.test.mjs reads DRAFTER_MIB from drafting.py and fails when a copy differs.
Marker per backend: CUDA and HIP builds carry the text (src/core/dflash2.cpp); the SYCL drafter (sycl/src/core/dflash2.cpp, bf16 select kernel) does not read Q4_0 rows, its built binary (P1006 rc1sycl) has no such text so it stays on the bf16 pack, and its loader now refuses a Q4_0 codebook with a plain message instead of tiling it as a matrix. Metal: DF2-METAL's f-0291-metal-selq4. The idea of the Q4_0 selector is nazeshinjite's (nazeshinjite/Qwen3.8-Flash-Next-DFlash2-GGUF).
strata_control/drafting.py: "sycl" joins DFLASH2_BACKENDS, so Auto picks DFlash2 (Q4_0 pack, no MTP layer, --draft-fallback none) on an Intel engine.
BACKEND_CONF = {"sycl": 0.6} replaces the CUDA slot steps for Intel (A750, 298 expert slots, serve sweeps: 0.6 was the best of 0.35 / 0.6 / 0.8); a --draft-conf
of the person's own still wins. An Arc A-series card (A3xx / A5xx / A7xx, told by its Windows adapter name or its Linux PCI id) counts as tested; Arc B-series,
Arc Pro and integrated graphics keep "has not been tested on your graphics card yet".
sycl engine: --mtp-draft-vocab is accepted in place of --mtp for the draft vocabulary (the app passes no --mtp with DFlash2); STRATA_DF2_TIMING also prints the
request-end context update and each prompt context update, STRATA_DF2_NO_PROMPT_CTX (measurement only) skips the prompt's context update.
dflash2_bench: a ctx mode that times the prompt's context update.
Measured on the A750 (IQ3_XXS, --prompt-cache 6, 5 rounds): DFlash2 alone is 2.6% behind MTP in decode tokens per second (95% interval -4.8 to -0.4) and 1.1%
behind over time; a fresh 4K prompt reads 4.6 s slower. Tests: tests/terminal/test_drafting.py, test_drafting_hardware.py, test_issues_022.py (117 pass).