[GH-ISSUE #4213] [Engine] isa_guard_check: strata::kernels::cpu::iq512x_rows holds wide-ISA code but is not allowed #1851

Closed
opened 2026-11-04 01:54:42 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Dmitry-B on GitHub (Oct 26, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4213

Area

Engine

Desktop app, Terminal or source?

Source (I build the engine on this machine with setup.py --update)

What happened

isa_guard_check fails after a normal source build of 0.1.51. The guard reports that
strata::kernels::cpu::iq512x_rows in build-tests/libstrata_kernels_cpu.a contains wide-ISA
instructions (777 of them, the first being vmovq) but is not in the list of functions allowed to hold
them. Of 755 functions in that archive, 117 hold wide instructions, and this is the only public one that
is not listed. On a CPU without AVX-512 this is the class of thing that turns into an illegal instruction.

Smallest steps or command that reproduce it

cmake -G Ninja -S . -B build-tests -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON \
      -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=89
cmake --build build-tests
ctest --test-dir build-tests -R isa_guard_check --output-on-failure

Reproduction status

Reproduces every time on a fresh build tree, and also in a clean git worktree of tag v0.2.6 with no
local files.

Strata version

Strata 0.2.6 · engine 0.1.51 · commit 4b9e05a2a806a3fe24f7b2560d98626c37dade35. The previous build on
this machine (0.1.48.1, from v0.2.3.1) did not report this.

Graphics card, memory and system

RTX 4090 24 GB · 46 GB RAM · Ubuntu 26.04.1 (kernel 7.0.0-38), CUDA 13.4, driver 615.71.09,
AMD Ryzen 9 7950X (this CPU does have AVX-512, so the failure is only visible through the guard).

Model, size and settings

Not related to a model: it is the build-time guard. (The model served on this machine is
Qwen3.8-Flash-Next IQ3_XXS at a 204800-token context.)

Logs

isa_guard_check: build-tests/libstrata_kernels_cpu.a: 755 functions, 117 hold wide-ISA
instructions, 1 is not allowed: strata::kernels::cpu::iq512x_rows (777 wide instructions,
first vmovq)

Originally created by @Dmitry-B on GitHub (Oct 26, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4213 ### Area Engine ### Desktop app, Terminal or source? Source (I build the engine on this machine with `setup.py --update`) ### What happened `isa_guard_check` fails after a normal source build of 0.1.51. The guard reports that `strata::kernels::cpu::iq512x_rows` in `build-tests/libstrata_kernels_cpu.a` contains wide-ISA instructions (777 of them, the first being `vmovq`) but is not in the list of functions allowed to hold them. Of 755 functions in that archive, 117 hold wide instructions, and this is the only public one that is not listed. On a CPU without AVX-512 this is the class of thing that turns into an illegal instruction. ### Smallest steps or command that reproduce it ``` cmake -G Ninja -S . -B build-tests -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON \ -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=89 cmake --build build-tests ctest --test-dir build-tests -R isa_guard_check --output-on-failure ``` ### Reproduction status Reproduces every time on a fresh build tree, and also in a clean `git worktree` of tag `v0.2.6` with no local files. ### Strata version Strata 0.2.6 · engine 0.1.51 · commit `4b9e05a2a806a3fe24f7b2560d98626c37dade35`. The previous build on this machine (0.1.48.1, from v0.2.3.1) did not report this. ### Graphics card, memory and system RTX 4090 24 GB · 46 GB RAM · Ubuntu 26.04.1 (kernel 7.0.0-38), CUDA 13.4, driver 615.71.09, AMD Ryzen 9 7950X (this CPU does have AVX-512, so the failure is only visible through the guard). ### Model, size and settings Not related to a model: it is the build-time guard. (The model served on this machine is Qwen3.8-Flash-Next IQ3_XXS at a 204800-token context.) ### Logs ``` isa_guard_check: build-tests/libstrata_kernels_cpu.a: 755 functions, 117 hold wide-ISA instructions, 1 is not allowed: strata::kernels::cpu::iq512x_rows (777 wide instructions, first vmovq) ``` ---
Author
Owner

@rwkeyes commented on GitHub (Oct 27, 2026):

One more data point, and a patch.

Built v0.2.7 (5e8a4cc) with -DSTRATA_ISA_FLOOR=avx, HIP gfx1100. The checker reports two functions here, not one:

check_isa_guard: libstrata_kernels_cpu.a: 761 functions, 137 hold wide-ISA instructions, 2 not allowed
  VIOLATION ...::iq512x_rows(int, ...) (12437 wide instructions, first vmovdqu64)
  VIOLATION ...::iq512_reference_gu_rows(int, ...) (123 wide instructions, first vxorps)

iq512_reference_gu_rows is not named in this report, and I could not find it in any open issue.

Both are reached only behind a CPU check: iq512x_rows through x512_one_ok()'s iq512x_supported(type) (has_vpopcnt()) and native_expert.cpp:424/425's x512_one = avx512 && ... (the DeepSeek CPU lane only for impl 2, which needs avx2 && want_512 && own_ok()); iq512_reference_gu_rows through native_expert.cpp:457's avx512 && ggml_cpu_has_avx2() && ggml_cpu_has_fma() && iq512_reference_ok().

One thing I noticed while tracing them: iq512_reference_ok() is the only probe of that pair without an internal cpu_avx512_ok() — unlike its sibling x512_one_ok(), its safety rests on the caller's && ordering, and the probe itself calls the wide rows.

#4349 adds both names to WIDE_PUBLIC plus a unit test, in the shape of f9e1fff98, and that one guard line. Happy to drop the guard hunk if you would rather keep the change to the list alone.

Same build after the patch: 0 not allowed, isa_guard_check passes in ctest, battery 168/175 -> 169/175 with the six pre-existing failures unchanged. On a Ryzen 7 7700X + Arc Pro B70 SYCL build: 0 not allowed, 48/51 unchanged, ctest 72.51 s -> 72.39 s.

<!-- gh-comment-id:6450730644 --> @rwkeyes commented on GitHub (Oct 27, 2026): One more data point, and a patch. Built v0.2.7 (`5e8a4cc`) with `-DSTRATA_ISA_FLOOR=avx`, HIP `gfx1100`. The checker reports **two** functions here, not one: ``` check_isa_guard: libstrata_kernels_cpu.a: 761 functions, 137 hold wide-ISA instructions, 2 not allowed VIOLATION ...::iq512x_rows(int, ...) (12437 wide instructions, first vmovdqu64) VIOLATION ...::iq512_reference_gu_rows(int, ...) (123 wide instructions, first vxorps) ``` `iq512_reference_gu_rows` is not named in this report, and I could not find it in any open issue. Both are reached only behind a CPU check: `iq512x_rows` through `x512_one_ok()`'s `iq512x_supported(type)` (`has_vpopcnt()`) and `native_expert.cpp:424/425`'s `x512_one = avx512 && ...` (the DeepSeek CPU lane only for `impl 2`, which needs `avx2 && want_512 && own_ok()`); `iq512_reference_gu_rows` through `native_expert.cpp:457`'s `avx512 && ggml_cpu_has_avx2() && ggml_cpu_has_fma() && iq512_reference_ok()`. One thing I noticed while tracing them: `iq512_reference_ok()` is the only probe of that pair without an internal `cpu_avx512_ok()` — unlike its sibling `x512_one_ok()`, its safety rests on the caller's `&&` ordering, and the probe itself calls the wide rows. #4349 adds both names to `WIDE_PUBLIC` plus a unit test, in the shape of `f9e1fff98`, and that one guard line. Happy to drop the guard hunk if you would rather keep the change to the list alone. Same build after the patch: `0 not allowed`, `isa_guard_check` passes in ctest, battery 168/175 -> 169/175 with the six pre-existing failures unchanged. On a Ryzen 7 7700X + Arc Pro B70 SYCL build: `0 not allowed`, 48/51 unchanged, ctest 72.51 s -> 72.39 s.
Author
Owner

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

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660131250 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1851
No description provided.