[GH-ISSUE #1794] setup_intel.py: sycl_version() returns "0", so setup refuses UD-IQ4_XS and UD-Q4_K_XL on Intel #712

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

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

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
sycl_version() reads the version with a regex from sycl/CMakeLists.txt. That file no longer contains a literal
version number, so the function returns "0". "0" goes into the stub BUILD.json, and the engine-version gate in
setup.py then refuses every model with an "engine" minimum.

Code

  • sycl/setup_intel.py:103-105
    def sycl_version() -> str:
        m = re.search(r"project\(\s*\S+\s+VERSION\s+([\d.]+)", (ROOT / "sycl" / "CMakeLists.txt").read_text())
        return m.group(1) if m else "0"
    
  • sycl/CMakeLists.txt:21: project(strata_sycl VERSION ${STRATA_SYCL_VERSION} LANGUAGES C CXX). The version
    comes from the top-level CMakeLists.txt (lines 14-19) and is a variable here, so [\d.]+ never matches.
  • sycl/setup_intel.py:207 writes {"version": sycl_version(), ...} into the stub BUILD.json. Line 234 hands
    that stub to setup as the engine.
  • setup.py:5241-5246 parses "0" as (0,) and compares it with MODELS[model]["engine"]: (0, 1, 38) for
    UD-IQ4_XS (setup.py:232) and UNSLOTH_ENGINE = (0, 1, 32) for UD-Q4_K_XL (setup.py:256).

Repro

./setup.sh --backend sycl      # pick UD-IQ4_XS (or UD-Q4_K_XL)

Expected: setup accepts the model, since the engine being built is 0.1.41.

Actual:

UD-IQ4_XS needs engine 0.1.38 or newer; this one is 0

UD-Q4_K_XL fails the same way.

Workaround used: a wrapper that sets the version from the top-level project(strata VERSION x) before setup runs.

Suggested fix: read the version the same way sycl/CMakeLists.txt does, from the top-level CMakeLists.txt,
and keep the literal fallback:

def sycl_version() -> str:
    for p, rx in ((ROOT / "CMakeLists.txt", r"^project\(strata VERSION ([\d.]+)"),
                  (ROOT / "sycl" / "CMakeLists.txt", r"set\(STRATA_SYCL_VERSION ([\d.]+)\)")):
        m = re.search(rx, p.read_text(), re.M)
        if m:
            return m.group(1)
    return "0"

Related: none found. Open PR #1390 edits sycl/setup_intel.py (native Windows) but does not touch
sycl_version().

Also consider making "0" fail loudly. A version that cannot be parsed should be a setup error, not a version older
than every model's minimum. A unit test that asserts sycl_version() != "0" on the repo would catch the next
regression.

Originally created by @agnaylor on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1794 **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** `sycl_version()` reads the version with a regex from `sycl/CMakeLists.txt`. That file no longer contains a literal version number, so the function returns `"0"`. `"0"` goes into the stub `BUILD.json`, and the engine-version gate in `setup.py` then refuses every model with an `"engine"` minimum. **Code** - `sycl/setup_intel.py:103-105` ```python def sycl_version() -> str: m = re.search(r"project\(\s*\S+\s+VERSION\s+([\d.]+)", (ROOT / "sycl" / "CMakeLists.txt").read_text()) return m.group(1) if m else "0" ``` - `sycl/CMakeLists.txt:21`: `project(strata_sycl VERSION ${STRATA_SYCL_VERSION} LANGUAGES C CXX)`. The version comes from the top-level `CMakeLists.txt` (lines 14-19) and is a variable here, so `[\d.]+` never matches. - `sycl/setup_intel.py:207` writes `{"version": sycl_version(), ...}` into the stub `BUILD.json`. Line 234 hands that stub to setup as the engine. - `setup.py:5241-5246` parses `"0"` as `(0,)` and compares it with `MODELS[model]["engine"]`: `(0, 1, 38)` for UD-IQ4_XS (`setup.py:232`) and `UNSLOTH_ENGINE = (0, 1, 32)` for UD-Q4_K_XL (`setup.py:256`). **Repro** ``` ./setup.sh --backend sycl # pick UD-IQ4_XS (or UD-Q4_K_XL) ``` **Expected:** setup accepts the model, since the engine being built is 0.1.41. **Actual:** ``` UD-IQ4_XS needs engine 0.1.38 or newer; this one is 0 ``` UD-Q4_K_XL fails the same way. **Workaround used:** a wrapper that sets the version from the top-level `project(strata VERSION x)` before setup runs. **Suggested fix:** read the version the same way `sycl/CMakeLists.txt` does, from the top-level `CMakeLists.txt`, and keep the literal fallback: ```python def sycl_version() -> str: for p, rx in ((ROOT / "CMakeLists.txt", r"^project\(strata VERSION ([\d.]+)"), (ROOT / "sycl" / "CMakeLists.txt", r"set\(STRATA_SYCL_VERSION ([\d.]+)\)")): m = re.search(rx, p.read_text(), re.M) if m: return m.group(1) return "0" ``` **Related:** none found. Open PR #1390 edits `sycl/setup_intel.py` (native Windows) but does not touch `sycl_version()`. Also consider making `"0"` fail loudly. A version that cannot be parsed should be a setup error, not a version older than every model's minimum. A unit test that asserts `sycl_version() != "0"` on the repo would catch the next regression.
Author
Owner

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

Fixed in v0.1.42 by #1817 (the SYCL setup reads the project version from the source with setup's own parser, so the stub no longer reports 0).

<!-- gh-comment-id:6099722899 --> @Niko1221 commented on GitHub (Oct 10, 2026): Fixed in v0.1.42 by #1817 (the SYCL setup reads the project version from the source with setup's own parser, so the stub no longer reports 0).
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#712
No description provided.