docs, settings register: STRATA_SYCL_NO_XMX, the repeatable mode on an Arc A-series card

On an Arc A-series card (Alchemist, DG2) Intel's oneMKL GEMM, used for prompt reading in the Inkling 2 Mini engine, gives last-bit
differences between runs: five runs of the same 64-token prompt on an A750 gave five different logits hashes. With the XMX path off the
hash is the same in every run, at about 40% of the prompt speed (45.1 -> 17.1 tok/s, four alternating pairs; decode unchanged at
2.1 tok/s). The Arc Pro B70 (Battlemage) repeats with XMX on (UD-Q4_K_XL and SQ-20, five runs each). The default stays XMX on.

- docs/INTEL.md: a plain section "Repeatable answers on an Alchemist card (Inkling 2 Mini)" and a row in the switch reference.
- The engine now reads STRATA_SYCL_NO_XMX=1 as well as the older INK_SYCL_NO_XMX=1 (one helper, sy_no_xmx_requested(), used by
  xmx_enabled() and by the device capability probe); the register scans STRATA_* names only, so this is how the switch gets listed.
- terminal/data/settings-register.json (regenerated with tools/settings_register.py; status opt-in, note with the numbers) and docs/SETTINGS.md.
- tools/settings_register.py: a name read under engine/src/<model>/sycl/ or /metal/ is now listed as Intel Arc / Mac, not "NVIDIA and AMD"
  (this also corrects STRATA_METAL_EXP_CACHE_GB).

Checked on the A750 with UD-IQ1_S: STRATA_SYCL_NO_XMX=1 and INK_SYCL_NO_XMX=1 each give one logits hash (2780509b400ba29d) in 3 runs.
tools/check --only docs and tools.test_settings_register pass.
This commit is contained in:
Niko1221 committed 2026-11-23 15:49:04 +01:00
1 parent 96113f298e
commit 9b61b6918f
6 files changed
+125 -56

No files matched your search

+24
View File
@@ -308,6 +308,29 @@ The Battlemage AOT build compiles with the trellis kernels and was not run.
Decode is bound by the CPU pool and the PCIe link (10.4 GB/s), not by the card's kernels. `--prefill 1024` gave +13% decode and
-24% prompt speed; the default stays `--prefill auto`.
### Repeatable answers on an Alchemist card (Inkling 2 Mini)
On an Arc A-series card (Alchemist, DG2: A380, A580, A750, A770), Intel's oneMKL matrix multiply, which the Inkling 2 Mini engine
uses to read the prompt, gives last-bit differences between runs. Send the same prompt twice and the numbers behind the first answer
token can differ in the last digits, so an answer can vary slightly from run to run. The model still answers correctly: first
chats, a needle in a 32,000-token prompt and 9 parallel requests were right on an A750.
For results that repeat, turn the XMX matrix path off:
```sh
STRATA_SYCL_NO_XMX=1 # the older name INK_SYCL_NO_XMX=1 works too
```
The price is prompt-reading speed: about 60% of it (45 tokens a second down to 17 on an A750 with Inkling-2-Mini UD-IQ1_S, four
alternating runs, spread 0.1). Reading the answer out (decode) is unchanged at 2.1 tokens a second. The default stays XMX on, because
most people want the speed.
The Arc Pro B70 (Battlemage) repeats with XMX on: five runs of the same 64-token prompt gave one result with UD-Q4_K_XL and with SQ-20.
AMD and Apple Metal repeat too.
Also on an 8 GB card: the engine plans the memory for the `--parallel` and `--max-context` you ask for before it allocates, and if they
do not fit it stops at start and names the largest `--parallel` that does (an A750 with UD-IQ1_S at 4,096 tokens: 9, not 32).
## Pictures on an Arc
<a id="pictures-on-an-arc-2026-10-19-branch-f-021-arcvis"></a>
@@ -417,6 +440,7 @@ All are environment variables for the engine. Put them in the config's `"env"` b
| `STRATA_UMA` | From the device | `1` / `0`: plan the GPU as one that shares the system's RAM (an integrated GPU), or as a card. Linux. See [INTEL_ARC.md](INTEL_ARC.md#integrated-arc-gpus-the-b390-panther-lake) |
| `STRATA_UMA_HEADROOM_GIB` | 6 | On such a GPU, the GiB of RAM the engine leaves free when it sizes its cache |
| `STRATA_PF_XMX` | 2 on Alchemist | Grouped XMX expert launch; `0` off, `1` dequantize first |
| `STRATA_SYCL_NO_XMX` | Off (XMX on) | Inkling 2 Mini engine: `1` turns the oneMKL XMX matrix path off. On an Alchemist card this makes prompt reading repeatable between runs, at about 60% of the prompt speed ([above](#repeatable-answers-on-an-alchemist-card-inkling-2-mini)). `INK_SYCL_NO_XMX=1` is the older name |
| `STRATA_GDN_XE` | On for Alchemist | Sub-group GDN recurrence |
| `STRATA_SYCL_GDN_PREFILL_REG_QK` | Automatic on Level Zero Battlemage for the 128-wide, 16-key/48-value-head recurrence at 128 or more tokens | Load two consecutive inputs into subgroup registers and update the FP32 state in token order. Unset enables automatic selection. A value beginning with `1` requests the register kernel on supported inputs. Other explicit values, including `0`, an empty string, `on` and `true`, select the original column kernel. |
| `STRATA_COPY_ENGINE` | On for Battlemage | Expert copies on the copy engine |
+3 -2
View File
@@ -10,7 +10,7 @@ debugging and are kept in `terminal/data/settings-register.json`.
A number or a word is set like any environment variable, for example `STRATA_KVA=1`. In the Terminal, `strata launch --set NAME=value`
puts it in the model's run configuration.
## Switches you can turn on (332)
## Switches you can turn on (333)
Off unless you set them. The last column says where each one is described.
@@ -157,7 +157,7 @@ Off unless you set them. The last column says where each one is described.
| `STRATA_MEMORY_LIMIT_MIB` | on / off | NVIDIA and AMD | [DETAILS.md](DETAILS.md) |
| `STRATA_METAL_ARENA_GB` | number | Mac | [MAC.md](MAC.md) |
| `STRATA_METAL_CONTIG` | number | Mac | [MAC.md](MAC.md) |
| `STRATA_METAL_EXP_CACHE_GB` | number | NVIDIA and AMD | - |
| `STRATA_METAL_EXP_CACHE_GB` | number | Mac | - |
| `STRATA_METAL_GYRO_TILES` | on / off | Mac | [MAC.md](MAC.md) |
| `STRATA_METAL_KEEP_FREE_GB` | number | Mac | [MAC.md](MAC.md) |
| `STRATA_METAL_KEEP_HOST_WEIGHTS` | on / off | Mac | [MAC.md](MAC.md) |
@@ -332,6 +332,7 @@ Off unless you set them. The last column says where each one is described.
| `STRATA_STATE_HASH` | on / off | NVIDIA and AMD, Intel Arc | [SPLIT_SERVE.md](SPLIT_SERVE.md) |
| `STRATA_SYCL_BMG_EXPERT_WINDOW` | on / off | Intel Arc | [INTEL.md](INTEL.md) |
| `STRATA_SYCL_GEMM_STAGE` | on / off | Intel Arc | [INTEL.md](INTEL.md) |
| `STRATA_SYCL_NO_XMX` | on / off | Intel Arc | [INTEL.md](INTEL.md) |
| `STRATA_TEST_BELL_SLEEP_US` | number | NVIDIA and AMD | [BATCHING.md](BATCHING.md) |
| `STRATA_TOPK_MULTI` | on / off | NVIDIA and AMD | [OLDER_GPUS.md](OLDER_GPUS.md) |
| `STRATA_TOPK_OLD` | on / off | NVIDIA and AMD, Intel Arc | [AMD_HIP.md](AMD_HIP.md) |
+12 -1
View File
@@ -43,6 +43,17 @@ inline double now_s() {
return std::chrono::duration<double>(std::chrono::steady_clock::now().time_since_epoch()).count();
}
// STRATA_SYCL_NO_XMX=1 (or the older name INK_SYCL_NO_XMX=1) turns the oneMKL XMX GEMM path off. On Arc A-series (Alchemist / DG2) that GEMM
// gives last-bit differences between runs in prompt reading; without it the logits repeat, at about 40% of the prompt speed (docs/INTEL.md).
inline bool sy_no_xmx_requested() {
static const bool v = [] {
const char* e = std::getenv("STRATA_SYCL_NO_XMX");
if (!e || !e[0]) e = std::getenv("INK_SYCL_NO_XMX");
return e && e[0] == '1';
}();
return v;
}
inline void sy_setenv(const char* k, const char* v, int overwrite = 1) {
#ifdef _WIN32
if (!overwrite && std::getenv(k)) return;
@@ -207,7 +218,7 @@ inline const SyDevCaps& dev_caps() {
for (auto s : dev.get_info<sycl::info::device::sub_group_sizes>()) {
if (s == 16) c.has_sg16 = true;
}
const bool no_xmx = std::getenv("INK_SYCL_NO_XMX") && std::getenv("INK_SYCL_NO_XMX")[0] == '1';
const bool no_xmx = sy_no_xmx_requested();
if (!no_xmx && c.has_sg16) {
// Xe2 Battlemage (B580 bmg_g21, Arc Pro B60/B70 bmg_g31, Lunar Lake) & PVC natively support SG16 XMX
if (c.name.find("B5") != std::string::npos || c.name.find("B6") != std::string::npos ||
+1 -5
View File
@@ -22,11 +22,7 @@ namespace ink_sycl {
inline bool xmx_enabled() {
#ifdef INK_SYCL_USE_ONEMKL
static const bool on = [] {
const char* e = std::getenv("INK_SYCL_NO_XMX");
return !(e && e[0] == '1');
}();
return on;
return !sy_no_xmx_requested();
#else
return false;
#endif
+83 -46
View File
@@ -1929,9 +1929,9 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:433",
"docs/INTEL.md:533",
"docs/INTEL.md:534"
"docs/INTEL.md:457",
"docs/INTEL.md:557",
"docs/INTEL.md:558"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -4052,7 +4052,7 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:217",
"docs/INTEL.md:422"
"docs/INTEL.md:446"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -4182,7 +4182,8 @@
{
"name": "STRATA_CPUEXP_COLD_IO",
"backends": [
"cuda-hip"
"cuda-hip",
"sycl"
],
"reads": [
{
@@ -4194,7 +4195,7 @@
{
"file": "engine/src/hy4flash/sycl/sy_graph.h",
"line": 224,
"backend": "cuda-hip",
"backend": "sycl",
"fn": "getenv"
}
],
@@ -5068,7 +5069,7 @@
"launch_reads": [],
"doc_mentions": [
"docs/AMD_HIP.md:516",
"docs/INTEL.md:439",
"docs/INTEL.md:463",
"docs/bench-results/2026-10-05-community-arc-b65/BUILD.md:3",
"docs/bench-results/2026-10-05-community-arc-b65/BUILD.md:93",
"docs/bench-results/2026-10-05-community-arc-b65/README.md:58",
@@ -8745,7 +8746,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:435"
"docs/INTEL.md:459"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -9345,7 +9346,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:429"
"docs/INTEL.md:453"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -10389,7 +10390,7 @@
],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:348",
"docs/INTEL.md:371",
"docs/RADEON_780M.md:84",
"docs/STRIX_HALO.md:111"
],
@@ -10433,7 +10434,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:348"
"docs/INTEL.md:371"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -10578,7 +10579,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:512"
"docs/INTEL.md:536"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -11218,9 +11219,9 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:271",
"docs/INTEL.md:420",
"docs/INTEL.md:517",
"docs/INTEL.md:531"
"docs/INTEL.md:444",
"docs/INTEL.md:541",
"docs/INTEL.md:555"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -15442,19 +15443,19 @@
{
"name": "STRATA_HY4_KERNELS",
"backends": [
"cuda-hip"
"metal"
],
"reads": [
{
"file": "engine/src/hy4flash/metal/hy4_metal_main.cpp",
"line": 1662,
"backend": "cuda-hip",
"backend": "metal",
"fn": "getenv"
},
{
"file": "engine/src/hy4flash/metal/hy4_metal_main.cpp",
"line": 1709,
"backend": "cuda-hip",
"backend": "metal",
"fn": "getenv"
}
],
@@ -17078,7 +17079,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:434"
"docs/INTEL.md:458"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -19469,8 +19470,8 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:219",
"docs/INTEL.md:407",
"docs/INTEL.md:427",
"docs/INTEL.md:430",
"docs/INTEL.md:451",
"docs/INTEL_ARC.md:192"
],
"first_commit": "4058aa782b",
@@ -20650,13 +20651,13 @@
{
"name": "STRATA_METAL_EXP_CACHE_GB",
"backends": [
"cuda-hip"
"metal"
],
"reads": [
{
"file": "engine/src/hy4flash/metal/hy4_metal_main.cpp",
"line": 643,
"backend": "cuda-hip",
"backend": "metal",
"fn": "getenv"
}
],
@@ -22834,8 +22835,8 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:134",
"docs/INTEL.md:416",
"docs/INTEL.md:427",
"docs/INTEL.md:439",
"docs/INTEL.md:451",
"docs/INTEL_ARC.md:64",
"docs/INTEL_ARC.md:147",
"docs/INTEL_ARC.md:192",
@@ -23299,7 +23300,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:430"
"docs/INTEL.md:454"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -23675,7 +23676,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:431"
"docs/INTEL.md:455"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -23962,7 +23963,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:430"
"docs/INTEL.md:454"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -31378,8 +31379,8 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:273",
"docs/INTEL.md:419",
"docs/INTEL.md:536",
"docs/INTEL.md:442",
"docs/INTEL.md:560",
"docs/release-notes-0.2.0.md:57"
],
"first_commit": "4058aa782b",
@@ -34283,7 +34284,7 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:210",
"docs/INTEL.md:426"
"docs/INTEL.md:450"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -34927,7 +34928,7 @@
"docs/AMD_HIP_PERFORMANCE.md:15",
"docs/AMD_HIP_PERFORMANCE.md:19",
"docs/INTEL.md:242",
"docs/INTEL.md:424",
"docs/INTEL.md:448",
"docs/INTEL_INT8_EXPERTS.md:15",
"docs/INTEL_INT8_EXPERTS.md:16",
"docs/INTEL_INT8_EXPERTS.md:18",
@@ -35340,7 +35341,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:425"
"docs/INTEL.md:449"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -36788,9 +36789,9 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:389",
"docs/INTEL.md:436",
"docs/INTEL.md:532"
"docs/INTEL.md:412",
"docs/INTEL.md:460",
"docs/INTEL.md:556"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -38195,7 +38196,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:432"
"docs/INTEL.md:456"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -45942,7 +45943,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:401"
"docs/INTEL.md:424"
],
"first_commit": "f44ed40b8d",
"first_date": "2026-11-22",
@@ -45977,7 +45978,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:400"
"docs/INTEL.md:423"
],
"first_commit": "f44ed40b8d",
"first_date": "2026-11-22",
@@ -46315,7 +46316,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:421"
"docs/INTEL.md:445"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -46456,7 +46457,7 @@
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:160",
"docs/INTEL.md:437"
"docs/INTEL.md:461"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -46805,6 +46806,42 @@
"retire_after": "",
"retired_in": ""
},
{
"name": "STRATA_SYCL_NO_XMX",
"backends": [
"sycl"
],
"reads": [
{
"file": "engine/src/inkling2/sycl/ink_sy_common.h",
"line": 50,
"backend": "sycl",
"fn": "getenv"
}
],
"parse": "flag",
"default_state": "off",
"code_default": null,
"engine_sets": [],
"engine_defaults": [],
"launch_files": [],
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:321",
"docs/INTEL.md:443"
],
"first_commit": null,
"first_date": null,
"since": null,
"last_commit": null,
"last_date": null,
"status": "opt-in",
"owner": "sycl/inkling2",
"note": "[reviewed] Inkling 2 Mini SYCL engine: 1 turns the oneMKL XMX GEMM path off (INK_SYCL_NO_XMX=1 is the older name). On Arc A-series (Alchemist, DG2) that GEMM gives last-bit differences between runs in prompt reading, so answers can vary slightly from run to run; with it off the logits repeat, at about 40% of the prompt speed (45 -> 17 tok/s on an A750, decode unchanged). Arc Pro B70 (Battlemage) is repeatable with XMX on. [docs/INTEL.md: Repeatable answers on an Alchemist card]",
"retire_after": "",
"retired_in": ""
},
{
"name": "STRATA_SYCL_PACKED_SIGNS",
"backends": [
@@ -48487,7 +48524,7 @@
"docs/BATCHING.md:126",
"docs/DETAILS.md:1305",
"docs/DETAILS.md:1780",
"docs/INTEL.md:401",
"docs/INTEL.md:424",
"docs/bench-results/2026-10-05-community-arc-b65/benchy-v1/README.md:14",
"docs/bench-results/2026-10-07-community-arc-b65-v01402/BUILD.md:109"
],
@@ -48710,7 +48747,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:417",
"docs/INTEL.md:440",
"docs/INTEL_ARC.md:197"
],
"first_commit": "e7391915eb",
@@ -48825,7 +48862,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:418",
"docs/INTEL.md:441",
"docs/INTEL_ARC.md:188",
"docs/STRIX_HALO.md:31"
],
@@ -49788,7 +49825,7 @@
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [
"docs/INTEL.md:428"
"docs/INTEL.md:452"
],
"first_commit": "4058aa782b",
"first_date": "2026-11-17",
@@ -49946,7 +49983,7 @@
"docs/INTEL.md:212",
"docs/INTEL.md:255",
"docs/INTEL.md:265",
"docs/INTEL.md:415",
"docs/INTEL.md:438",
"docs/INTEL_ARC.md:63",
"docs/INTEL_ARC.md:153",
"docs/INTEL_ARC.md:191",
+2 -2
View File
@@ -195,9 +195,9 @@ def _pp_states(lines):
def _backend_of(path: str, flavours: set[str]) -> list[str]:
p = path
if p.startswith("engine/sycl/src"):
if p.startswith("engine/sycl/src") or "/sycl/" in p: # the Inkling 2 Mini and Hy4-Flash SYCL engines live under engine/src/<model>/sycl/
return ["sycl"]
if p.startswith("engine/metal/src"):
if p.startswith("engine/metal/src") or "/metal/" in p:
return ["metal"]
if "/cpu/" in p or p.endswith(("_cpu.cpp", "_cpu.hpp")):
return ["cpu"]