[GH-ISSUE #1795] sycl/CMakeLists.txt test registration lags the top-level one: iq_parity and ple_parity fail on every checkout #713

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

Originally created by @agnaylor on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1795

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:

// --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:

# 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).

Originally created by @agnaylor on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1795 **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).
Author
Owner

@Momoyeyu commented on GitHub (Oct 10, 2026):

Taking this one — PR #1828 ports the top-level registrations into sycl/CMakeLists.txt: iq/ple leave the generic --selftest loop, iq_parity gets the tools/iq_fixture.py CTest fixture with the python+numpy probe (IQ_FIXTURE_PYTHON, exit 3 = skip), and ple_parity runs with WORKING_DIRECTORY at the engine root plus STRATA_PLE_FIXTURE_DIR / STRATA_PLE_GGUF / STRATA_PLE_PACK configure inputs. Missing inputs stay a hard error; docs/INTEL.md names the variables. Verified the registration via ctest -N on the parity block (no SYCL toolchain here — a real ctest on your B70 box would be the confirmation).

<!-- gh-comment-id:6096048325 --> @Momoyeyu commented on GitHub (Oct 10, 2026): Taking this one — PR #1828 ports the top-level registrations into sycl/CMakeLists.txt: iq/ple leave the generic --selftest loop, iq_parity gets the tools/iq_fixture.py CTest fixture with the python+numpy probe (IQ_FIXTURE_PYTHON, exit 3 = skip), and ple_parity runs with WORKING_DIRECTORY at the engine root plus STRATA_PLE_FIXTURE_DIR / STRATA_PLE_GGUF / STRATA_PLE_PACK configure inputs. Missing inputs stay a hard error; docs/INTEL.md names the variables. Verified the registration via ctest -N on the parity block (no SYCL toolchain here — a real ctest on your B70 box would be the confirmation).
Author
Owner

@Niko1221 commented on GitHub (Oct 10, 2026):

Thank you, a clear report. In v0.1.42 the SYCL build registers the two tests the way the top-level build does: iq_parity gets an iq_parity_fixtures step that runs tools/iq_fixture.py into the build tree (skipped without python and numpy), and ple_parity runs from the engine root with -DSTRATA_PLE_GGUF=<shard 2 .gguf> and -DSTRATA_PLE_FIXTURE_DIR=

to point it at its inputs. A missing input stays a hard error, as you asked. docs/INTEL.md names the variables. We could not configure the SYCL tree on our Intel box in time, so the CMake change is reviewed but not run there.

<!-- gh-comment-id:6099740336 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thank you, a clear report. In v0.1.42 the SYCL build registers the two tests the way the top-level build does: iq_parity gets an iq_parity_fixtures step that runs tools/iq_fixture.py into the build tree (skipped without python and numpy), and ple_parity runs from the engine root with -DSTRATA_PLE_GGUF=<shard 2 .gguf> and -DSTRATA_PLE_FIXTURE_DIR=<dir> to point it at its inputs. A missing input stays a hard error, as you asked. docs/INTEL.md names the variables. We could not configure the SYCL tree on our Intel box in time, so the CMake change is reviewed but not run there.
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#713
No description provided.