Issues / #1795
#1795 sycl/CMakeLists.txt test registration lags the top-level one: iq_parity and ple_parity fail on every checkout
closed · @agnaylor · 2 comentários · No GitHub
AMD / HIPNVIDIA / CUDAModels & quantsDocumentation
Descrição
**Environment**
- Ubuntu 26.04.1, kernel 7.0.0-34, 2× Intel Arc Pro B70 (`xe`)
- compute-runtime 26.31.39395.14, oneAPI DPC++ 2026.1.1
- Native build (no Docker), AOT `-DSTRATA_SYCL_AOT=bmg-g31`
- Strata `fb58e0d` (v0.1.41)
**Summary**
The SYCL port registers both tests in its generic parity loop as `<test> --selftest`, run from the build tree:
- `sycl/CMakeLists.txt:227-233`: `foreach(p IN ITEMS dequant_s2 s2_gemv iq ... ple ...)` …
`add_test(NAME ${p}_parity COMMAND ${p}_parity --selftest)`
The top-level `CMakeLists.txt` registers each of them on its own, with what it needs. The SYCL copy never followed.
So both fail on every checkout of the port, for reasons unrelated to the kernels they test. Every port `ctest` run
then reports two red tests that mean nothing, which hides real ones.
| | top-level `CMakeLists.txt` (CUDA/HIP) | `sycl/CMakeLists.txt` |
|---|---|---|
| `iq_parity` | `iq_parity_fixtures` runs `tools/iq_fixture.py` as a CTest fixture; `iq_parity <build>/iq_fixture`; skip code 3 without numpy (`:666-710`, from #264, 0.1.31) | `iq_parity --selftest`, no fixture step |
| `ple_parity` | `--in/--out` from `STRATA_PLE_FIXTURE_DIR`, `WORKING_DIRECTORY` = source tree (`:914-925`) | `ple_parity --selftest`, working directory = build tree |
### a. `iq_parity` treats `--selftest` as its fixture directory
`iq_parity` has no flags: `sycl/src/kernels/iq_parity.cpp:29` reads
`const std::string dir = argc > 1 ? argv[1] : "logs/iq_fixture";`. The tool's documented use (`:3`) is
`python tools/iq_fixture.py --out <dir> && build/iq_parity <dir>`, and each missing fixture counts as a failure
(`:37-45`). Nothing in the SYCL build runs `tools/iq_fixture.py`.
**Actual**, on all ten types:
```
IQ2_XXS missing fixture: --selftest/IQ2_XXS.bin or --selftest/IQ2_XXS.f32 - generate the fixtures first with python tools/iq_fixture.py --out --selftest ...
```
### b. `ple_parity` looks for its GGUF relative to the build tree
`sycl/src/kernels/ple_parity.cpp:305-307`:
```cpp
// --gguf, else $STRATA_PLE_GGUF, else the development layout (run from the engine root)
std::string gguf = std::getenv("STRATA_PLE_GGUF") ? std::getenv("STRATA_PLE_GGUF")
: "../../Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf";
```
The comment says "run from the engine root", but CTest runs the test from the build tree. With `--selftest`, a
missing table returns `2` (`:330-334`), and so does a missing `dense.bin` pack (`:336-341`). No CMake variable reaches
the test, and `STRATA_PLE_GGUF` appears in the source but not in the docs.
**Actual:**
`ple_parity: required PLE table is missing or incompatible: ../../Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf (...)`
This issue does **not** ask for `ple_parity` to skip. The top-level CMake keeps a missing input as a hard error on
purpose ("A test that passes by finding nothing to compare is the failure mode this project keeps re-learning",
`CMakeLists.txt:914-917`), and #568's fixture-free rewrite was declined. The ask is only that the port get the same
contract: a hard error, but one a user can satisfy.
**Repro (both)**
```
cmake -S sycl -B build-sycl-aot -DSTRATA_SYCL_AOT=bmg-g31 && cmake --build build-sycl-aot -j
ctest --test-dir build-sycl-aot -R '^(iq|ple)_parity$' -V
```
**Expected:** the same behaviour as the CUDA build. `iq_parity` generates its fixtures and runs (or skips without
numpy). `ple_parity` can be pointed at its inputs at configure time, and its relative defaults resolve against the
engine root.
**Suggested fix:** take `iq` and `ple` out of the `foreach` at `sycl/CMakeLists.txt:227` and port the top-level
registrations:
```cmake
# iq: as CMakeLists.txt:700-706 (with the _iq_python interpreter probe from :669-699)
add_test(NAME iq_parity_fixtures COMMAND ${_iq_python} ${STRATA_ROOT}/tools/iq_fixture.py --out ${CMAKE_CURRENT_BINARY_DIR}/iq_fixture)
set_tests_properties(iq_parity_fixtures PROPERTIES FIXTURES_SETUP iq_fixture_data SKIP_RETURN_CODE 3)
add_test(NAME iq_parity COMMAND iq_parity ${CMAKE_CURRENT_BINARY_DIR}/iq_fixture)
set_tests_properties(iq_parity PROPERTIES FIXTURES_REQUIRED iq_fixture_data SKIP_RETURN_CODE 3)
# ple: as CMakeLists.txt:921-925, plus a variable for the GGUF the SYCL copy reads
set(STRATA_PLE_GGUF "" CACHE FILEPATH "Q2_0 shard 2 GGUF for ple_parity")
add_test(NAME ple_parity COMMAND ple_parity --selftest $<$<BOOL:${STRATA_PLE_GGUF}>:--gguf;${STRATA_PLE_GGUF}>
WORKING_DIRECTORY ${STRATA_ROOT} COMMAND_EXPAND_LISTS)
```
Add the `--pack` and `--in/--out` inputs (via `STRATA_PLE_FIXTURE_DIR`) the same way if the SYCL copy needs them.
Then name the variables in `docs/INTEL.md`'s build section, so a port user knows `ple_parity` needs the Q2_0 model.
**Related:** #264 (the `iq_parity` fix, top-level only); #568 (the stream-sync half was taken in 0.1.40.2, the
fixture-free `ple_parity` rewrite was declined).
No site
Links install, modelos, releases.