[GH-ISSUE #4546] [Engine] strata-sycl.sh drops every STRATA_* variable whose value is 0, so the documented STRATA_PREFILL_MMQ=0 (FP16 prompt path) never reaches the engine; "off" works by accident #2053

Open
opened 2026-11-04 01:56:16 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @otaliptus on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4546

Area

[Engine] (the SYCL serve path: sycl/serve/strata-sycl.sh, the config's exe on Intel)

Desktop app, Terminal or source?

Source

What happened

The launcher forwards STRATA_* (and ONEAPI_/UR_/IGC_/SYCL_/ZES_) variables into the container, but skips every one whose value is 0 or empty:

for k in "${!setting[@]}"; do
    # the engine tests the switches by presence: a value of 0 (or empty) means "not set", so it is not passed on
    case "${setting[$k]}" in 0|"") ;; *) envs+=(-e "$k=${setting[$k]}") ;; esac
done

That is right for a switch whose unset default is off, and wrong for a three-state switch where unset means "auto". STRATA_PREFILL_MMQ is one: unset = auto on Battlemage, 0 = the FP16 path. 0 is the documented value (docs/INTEL_INT8_EXPERTS.md: "STRATA_PREFILL_MMQ=0: the FP16 path everywhere"; the 0.2.0 release notes), and it is what the engine itself prints at start: int8 prompt experts are on (Battlemage default, auto); STRATA_PREFILL_MMQ=0 turns them off. A config with "env": {"STRATA_PREFILL_MMQ": "0"} (the documented way to give the engine a setting: the server puts the env block into the launcher's environment) starts the auto path anyway, and the log advises the value that was just dropped.

Trace, bash -x sycl/serve/strata-sycl.sh --version:

  • with STRATA_PREFILL_MMQ=0 the exec docker run line carries only the launcher's three defaults: -e STRATA_VERIFY_NO_HOST=1 -e STRATA_VERIFY_DEVICE_PLAN=1 -e STRATA_STAGER_THREADS=12;
  • with STRATA_PREFILL_MMQ=off it also carries -e STRATA_PREFILL_MMQ=off. "off" works only because choose_mode() in sycl/include/strata/prefill/esimd_moe.hpp parses a non-digit string as 0, which no document says.

Seen with the real engine (2026-10-26, v0.2.6 build): an A/B arm whose config env had STRATA_PREFILL_MMQ=0 logged int8 prompt experts are on (Battlemage default, auto) and ran at the auto path's speed (1115 tok/s on a 6,345-token prompt, against 1316 with "off"; the numbers are in the int8 issue I am filing next).

The launcher's own header example, "env": {"STRATA_VERIFY_NO_HOST": "0"}, works by accident: the 0 replaces the launcher's default 1 in the setting array and is then dropped, and the engine's unset default happens to be the same as 0. Other =0 forms the Intel docs give and the launcher cannot deliver: STRATA_I8_FORCE=0, STRATA_I8_WG=0, STRATA_MMVQ_A2=0, STRATA_MMVQ_WIDE_32=0, STRATA_LEND_MIRROR=0, STRATA_ARENA_ALIAS_CHECK=0, STRATA_SPLIT_HEADROOM=0, STRATA_MIRROR_MIB=0 (docs/INTEL.md, INTEL_ARC.md, INTEL_INT8_EXPERTS.md). I did not check which of those have an unset default equal to 0 and which do not.

Expected: a value the config's env block names reaches the engine as written. If some engine switches really are presence-tested (so that K=0 would turn them on), a short list of those names to keep dropping, or a list of the three-state names to pass through, would avoid this; dropping every 0 silently is what bites.

Smallest steps or command that reproduce it

  1. Intel install per docs/INTEL_ARC.md.
  2. In the run config: "env": {"STRATA_PREFILL_MMQ": "0"}; start the server; the engine log says int8 prompt experts are on (Battlemage default, auto).
  3. Change the value to "off": no int8 lines, FP16 timings.
  4. Without a GPU: STRATA_PREFILL_MMQ=0 bash -x sycl/serve/strata-sycl.sh --version 2>&1 | grep 'exec docker run' has no -e STRATA_PREFILL_MMQ; with =off it has.

Reproduction status

Reproduced locally

Strata version

Source v0.2.7.1 (46c152a1), engine 0.1.53 built from it; strata-sycl.sh is identical on main today and was the same on v0.2.6.

Graphics card, memory and system

Intel Arc Pro B70 32 GB · 62 GB RAM · Debian 13 (kernel 7.2.6, xe driver); engine in the strata-sycl-dev container

Model, size and settings

Qwen3.8-Flash-Next IQ3_S (native pack, --stream-experts, --prefill 4096), 256K context, pictures off

Logs

The trace lines above, and the engine's int8 prompt experts are on (Battlemage default, auto); STRATA_PREFILL_MMQ=0 turns them off under a config env of 0.

Originally created by @otaliptus on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4546 ### Area [Engine] (the SYCL serve path: `sycl/serve/strata-sycl.sh`, the config's `exe` on Intel) ### Desktop app, Terminal or source? Source ### What happened The launcher forwards `STRATA_*` (and ONEAPI_/UR_/IGC_/SYCL_/ZES_) variables into the container, but skips every one whose value is `0` or empty: ```bash for k in "${!setting[@]}"; do # the engine tests the switches by presence: a value of 0 (or empty) means "not set", so it is not passed on case "${setting[$k]}" in 0|"") ;; *) envs+=(-e "$k=${setting[$k]}") ;; esac done ``` That is right for a switch whose unset default is off, and wrong for a three-state switch where unset means "auto". `STRATA_PREFILL_MMQ` is one: unset = `auto` on Battlemage, `0` = the FP16 path. `0` is the documented value (docs/INTEL_INT8_EXPERTS.md: "`STRATA_PREFILL_MMQ=0`: the FP16 path everywhere"; the 0.2.0 release notes), and it is what the engine itself prints at start: `int8 prompt experts are on (Battlemage default, auto); STRATA_PREFILL_MMQ=0 turns them off`. A config with `"env": {"STRATA_PREFILL_MMQ": "0"}` (the documented way to give the engine a setting: the server puts the env block into the launcher's environment) starts the auto path anyway, and the log advises the value that was just dropped. Trace, `bash -x sycl/serve/strata-sycl.sh --version`: - with `STRATA_PREFILL_MMQ=0` the `exec docker run` line carries only the launcher's three defaults: `-e STRATA_VERIFY_NO_HOST=1 -e STRATA_VERIFY_DEVICE_PLAN=1 -e STRATA_STAGER_THREADS=12`; - with `STRATA_PREFILL_MMQ=off` it also carries `-e STRATA_PREFILL_MMQ=off`. "off" works only because `choose_mode()` in `sycl/include/strata/prefill/esimd_moe.hpp` parses a non-digit string as 0, which no document says. Seen with the real engine (2026-10-26, v0.2.6 build): an A/B arm whose config env had `STRATA_PREFILL_MMQ=0` logged `int8 prompt experts are on (Battlemage default, auto)` and ran at the auto path's speed (1115 tok/s on a 6,345-token prompt, against 1316 with "off"; the numbers are in the int8 issue I am filing next). The launcher's own header example, `"env": {"STRATA_VERIFY_NO_HOST": "0"}`, works by accident: the 0 replaces the launcher's default 1 in the `setting` array and is then dropped, and the engine's unset default happens to be the same as 0. Other `=0` forms the Intel docs give and the launcher cannot deliver: `STRATA_I8_FORCE=0`, `STRATA_I8_WG=0`, `STRATA_MMVQ_A2=0`, `STRATA_MMVQ_WIDE_32=0`, `STRATA_LEND_MIRROR=0`, `STRATA_ARENA_ALIAS_CHECK=0`, `STRATA_SPLIT_HEADROOM=0`, `STRATA_MIRROR_MIB=0` (docs/INTEL.md, INTEL_ARC.md, INTEL_INT8_EXPERTS.md). I did not check which of those have an unset default equal to 0 and which do not. Expected: a value the config's env block names reaches the engine as written. If some engine switches really are presence-tested (so that `K=0` would turn them on), a short list of those names to keep dropping, or a list of the three-state names to pass through, would avoid this; dropping every 0 silently is what bites. ### Smallest steps or command that reproduce it 1. Intel install per docs/INTEL_ARC.md. 2. In the run config: `"env": {"STRATA_PREFILL_MMQ": "0"}`; start the server; the engine log says `int8 prompt experts are on (Battlemage default, auto)`. 3. Change the value to `"off"`: no int8 lines, FP16 timings. 4. Without a GPU: `STRATA_PREFILL_MMQ=0 bash -x sycl/serve/strata-sycl.sh --version 2>&1 | grep 'exec docker run'` has no `-e STRATA_PREFILL_MMQ`; with `=off` it has. ### Reproduction status Reproduced locally ### Strata version Source v0.2.7.1 (46c152a1), engine 0.1.53 built from it; `strata-sycl.sh` is identical on main today and was the same on v0.2.6. ### Graphics card, memory and system Intel Arc Pro B70 32 GB · 62 GB RAM · Debian 13 (kernel 7.2.6, xe driver); engine in the strata-sycl-dev container ### Model, size and settings Qwen3.8-Flash-Next IQ3_S (native pack, `--stream-experts`, `--prefill 4096`), 256K context, pictures off ### Logs The trace lines above, and the engine's `int8 prompt experts are on (Battlemage default, auto); STRATA_PREFILL_MMQ=0 turns them off` under a config env of `0`.
Author
Owner

@otaliptus commented on GitHub (Nov 5, 2026):

Two more cases of the same launcher rule, seen while updating to 0.2.10 on the B70:

  1. The six #4185 Battlemage decode controls (STRATA_MMVQ_SHAPE_RPW, STRATA_IQ3S_GU_ROW_REUSE, STRATA_IQ2S_GU_ROW_REUSE, STRATA_IQ3XXS_GU_ROW_REUSE, STRATA_GR_LO_REUSE, STRATA_ATTN_MERGE_ACTIVE) are read by bm_default_on() as v[0] != '0'. So =0 is dropped by the launcher and leaves them on, and =off passes the launcher and ALSO leaves them on (first character is not 0). The only spelling that switches one off through strata-sycl.sh today is =00. STRATA_PROMPT_ATTN_ESIMD and STRATA_SELECT_GEMM use atoi, so =off works for those two, which makes the set inconsistent to document.
  2. STRATA_Q6_PLANAR (and STRATA_Q6_PACKED) accept exactly 0 and nothing else as "off" (v[0] == '0' && v[1] == '\0'), so they cannot be switched off through the launcher at all. I needed that for the DFlash2 planar-head test (#5286) and had to allow those two names through with a value of 0:
diff --git a/sycl/serve/strata-sycl.sh b/sycl/serve/strata-sycl.sh
index fcf31f0b..5a2f35b4 100755
--- a/sycl/serve/strata-sycl.sh
+++ b/sycl/serve/strata-sycl.sh
@@ -39,7 +39,11 @@ done < <(compgen -e)
 envs=()
 for k in "${!setting[@]}"; do
     # the engine tests the switches by presence: a value of 0 (or empty) means "not set", so it is not passed on
-    case "${setting[$k]}" in 0|"") ;; *) envs+=(-e "$k=${setting[$k]}") ;; esac
+    case "${setting[$k]}" in
+        "") ;;
+        0) case "$k" in STRATA_Q6_PLANAR|STRATA_Q6_PACKED) envs+=(-e "$k=0") ;; esac ;;   # local patch: these two read their value, 0 = off
+        *) envs+=(-e "$k=${setting[$k]}") ;;
+    esac
 done
 shm=()
 if [ "${STRATA_SYCL_SHM:-1}" != 0 ] && [ -d /dev/shm ]; then shm=(-v /dev/shm:/dev/shm); fi

A fix that covers all of this would be for the launcher to pass every value through and for the engine's presence-tested switches to treat 0/off as unset, or for the launcher to keep a list of the value-reading variables.

<!-- gh-comment-id:6654540011 --> @otaliptus commented on GitHub (Nov 5, 2026): Two more cases of the same launcher rule, seen while updating to 0.2.10 on the B70: 1. The six #4185 Battlemage decode controls (`STRATA_MMVQ_SHAPE_RPW`, `STRATA_IQ3S_GU_ROW_REUSE`, `STRATA_IQ2S_GU_ROW_REUSE`, `STRATA_IQ3XXS_GU_ROW_REUSE`, `STRATA_GR_LO_REUSE`, `STRATA_ATTN_MERGE_ACTIVE`) are read by `bm_default_on()` as `v[0] != '0'`. So `=0` is dropped by the launcher and leaves them on, and `=off` passes the launcher and ALSO leaves them on (first character is not `0`). The only spelling that switches one off through `strata-sycl.sh` today is `=00`. `STRATA_PROMPT_ATTN_ESIMD` and `STRATA_SELECT_GEMM` use `atoi`, so `=off` works for those two, which makes the set inconsistent to document. 2. `STRATA_Q6_PLANAR` (and `STRATA_Q6_PACKED`) accept exactly `0` and nothing else as "off" (`v[0] == '0' && v[1] == '\0'`), so they cannot be switched off through the launcher at all. I needed that for the DFlash2 planar-head test (#5286) and had to allow those two names through with a value of 0: ```diff diff --git a/sycl/serve/strata-sycl.sh b/sycl/serve/strata-sycl.sh index fcf31f0b..5a2f35b4 100755 --- a/sycl/serve/strata-sycl.sh +++ b/sycl/serve/strata-sycl.sh @@ -39,7 +39,11 @@ done < <(compgen -e) envs=() for k in "${!setting[@]}"; do # the engine tests the switches by presence: a value of 0 (or empty) means "not set", so it is not passed on - case "${setting[$k]}" in 0|"") ;; *) envs+=(-e "$k=${setting[$k]}") ;; esac + case "${setting[$k]}" in + "") ;; + 0) case "$k" in STRATA_Q6_PLANAR|STRATA_Q6_PACKED) envs+=(-e "$k=0") ;; esac ;; # local patch: these two read their value, 0 = off + *) envs+=(-e "$k=${setting[$k]}") ;; + esac done shm=() if [ "${STRATA_SYCL_SHM:-1}" != 0 ] && [ -d /dev/shm ]; then shm=(-v /dev/shm:/dev/shm); fi ``` A fix that covers all of this would be for the launcher to pass every value through and for the engine's presence-tested switches to treat `0`/`off` as unset, or for the launcher to keep a list of the value-reading variables.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2053
No description provided.