Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

sycl: use the source version for setup model checks

nekomario2872843d4ca946
diff --git a/sycl/setup_intel.py b/sycl/setup_intel.py
index 05521ea4e..e8040cd73 100644
--- a/sycl/setup_intel.py
+++ b/sycl/setup_intel.py
@@ -108,8 +108,7 @@ def sycl_path(path) -> str:
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"
+ return S.source_version()
def flag(args, name):
diff --git a/tools/test_setup_sycl.py b/tools/test_setup_sycl.py
index 6aa1f1fa5..cec1e5e9e 100644
--- a/tools/test_setup_sycl.py
+++ b/tools/test_setup_sycl.py
@@ -10,6 +10,7 @@ import contextlib
import io
import re
import sys
+import tempfile
import unittest
from pathlib import Path
from unittest import mock
@@ -106,6 +107,32 @@ class CMakeOption(unittest.TestCase):
self.assertIn("add_subdirectory(sycl)", src)
+class SyclVersion(unittest.TestCase):
+ def setUp(self):
+ from sycl import setup_intel
+ self.mod = setup_intel
+
+ def test_version_matches_the_source_and_satisfies_native_models(self):
+ version = self.mod.sycl_version()
+ self.assertNotEqual(version, "0")
+ self.assertEqual(version, setup.source_version())
+ numbers = tuple(int(x) for x in version.split("."))
+ for model in ("UD-IQ4_XS", "UD-Q4_K_XL"):
+ with self.subTest(model=model):
+ self.assertGreaterEqual(numbers, setup.MODELS[model].get("engine", setup.UNSLOTH_ENGINE))
+
+ def test_version_follows_a_source_hotfix_with_a_variable_sycl_project(self):
+ with tempfile.TemporaryDirectory() as d:
+ root = Path(d)
+ (root / "CMakeLists.txt").write_text("project(strata VERSION 0.1.41.2 LANGUAGES CXX)\n", encoding="utf-8")
+ (root / "sycl").mkdir()
+ (root / "sycl" / "CMakeLists.txt").write_text(
+ "set(STRATA_SYCL_VERSION 0.1.40.2)\n"
+ "project(strata_sycl VERSION ${STRATA_SYCL_VERSION} LANGUAGES C CXX)\n", encoding="utf-8")
+ with mock.patch.object(self.mod, "ROOT", root), mock.patch.object(setup, "ROOT", root):
+ self.assertEqual(self.mod.sycl_version(), "0.1.41.2")
+
+
class IntelIds(unittest.TestCase):
"""sycl/setup_intel.py names a card by its PCI device id. The Arc Pro B60s measured on 2x B60 (`lspci -nn` 8086:e211,
bmg-g21) must not fall through to "Intel GPU e211 (xe)" with a guessed VRAM size."""