Issues / #3409
#3409 [Engine] isa_guard_check fails on Linux builds: tq_rows_avx512 (tq_avx512.cpp) is not in WIDE_PUBLIC / WIDE_OBJECTS
open · @Norhiro · 0 comentarios · En GitHub
Setup & installAMD / HIPNVIDIA / CUDAModels & quantsWindowsLinux
Descripción
### Area
[Engine] (speed, kernels, models, the server and API)
### Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
### What happened
Expected: `isa_guard_check` passes when every wide-ISA function is reached only behind a CPU check. Actual: it fails on one such function.
On a CUDA build of 0.2.0-beta with `-DSTRATA_BUILD_TESTS=ON -DSTRATA_ISA_FLOOR=avx`, ctest `isa_guard_check` fails:
```
check_isa_guard: .../libstrata_kernels_cpu.a: 481 functions, 70 hold wide-ISA instructions, 1 not allowed
VIOLATION strata::kernels::cpu::tq_detail::tq_rows_avx512(int, unsigned char const*, unsigned long, int, strata::kernels::cpu::tq_detail::TqAct const* const*, int, float* (606 wide instructions, first vmovq): wide-ISA code in an unlisted public function
```
#3358 shows the same violation on a HIP build ("outside the wide-ISA translation units (object tq_avx512.cpp.o)"), mentioned there as a side note.
As far as I can see this is a gap in the list, not an unguarded call. `tq_rows_avx512` is reached only through `tq_rows(tq_isa(), ...)` (tq_cpu.cpp:174). `tq_isa()` picks `TqIsa::avx512` only when `tq_isa_ok(TqIsa::avx512)` → `cpu_avx512_ok()`, and `tq_rows` aborts on an ISA the CPU lacks (tq_cpu.cpp:185). This host has no AVX2. No illegal instruction was seen in the engine or in any other test. All the AVX1/AVX2 parity tests pass: `router_dot_parity_avx`, `iq_avx1_parity`, `iq_avx2_parity`, `q8k_quant_parity_avx`.
**Suggested change (tested here)** in `tools/check_isa_guard.py`:
- add `"tq_rows_avx512"` to `WIDE_PUBLIC`
- add `"tq_avx512.cpp"` to `WIDE_OBJECTS` (so it is also in `INIT_FREE_OBJECTS`)
- add `"tq_avx2.cpp"` to the extra `INIT_FREE_OBJECTS`. It is compiled above the AVX baseline like `nvfp4_avx2.cpp`, so a static initialiser there would run on every CPU (#2324).
With these three changes the check reports `0 not allowed` on the same library. `tq_avx2.cpp` currently has no static initialiser, so adding it changes nothing today; it guards against a future one.
**Related, also seen here (already listed in #3358):** `tq_cpu_parity`, `tq_cpu_parity_avx2` and `native_hadamard_test` print `this ggml has no trellis types (build with STRATA_GGML_DIR = the agention ... fork)` and exit as **failed**. With the default upstream llama.cpp they would read better as **skipped** (`SKIP_RETURN_CODE 77`).
### Smallest steps or command that reproduce it
```
cmake -S . -B build-tests -DSTRATA_ENABLE_CUDA=ON -DSTRATA_ISA_FLOOR=avx -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=86
cmake --build build-tests && cd build-tests && ctest -R isa_guard_check --output-on-failure
```
### Reproduction status
Reproduced locally
### Strata version
Strata 0.2.0-beta · engine 0.1.45.3 (source, commit `3d1fb480`). `main` on 2026-10-20 has no `tq_rows_avx512` / `tq_avx512.cpp` in `tools/check_isa_guard.py`.
### Graphics card, memory and system
RTX 3060 12 GB (driver 610.57.04, CUDA 13.3 from the pip wheels, g++ 14.4.1), 2 × Xeon E5-2630 v2 (AVX, no AVX2/FMA), 252 GB DDR3, Fedora 44, binutils objdump.En el sitio
Enlaces a install, modelos, releases.