ling32: the Windows Intel route (Arc card in the hardware report, Ling and Inkling offered and installable, Qwen / Hy4 not offered until their Windows engines ship: per-family switches in intel_app); the oneAPI notice tests follow the checked-in licence texts; the one-word Intel picture-device fallback

This commit is contained in:
Niko1221 committed 2026-12-03 02:24:57 +01:00
1 parent db65eb47be
commit 9dc46d3269
5 files changed
+166 -26

No files matched your search

+4 -8
View File
@@ -9601,9 +9601,10 @@ def intel_control_setup(a) -> int:
from strata_control import intel_app
say("Strata on an Intel Arc card (the SYCL engine)")
step(1, "checking this computer")
if not intel_app.supported_here():
fail("the Intel Arc engine runs on Linux only", "there is no Windows or Mac Intel engine yet")
family = a.family or "qwen"
kind = "inkling" if family in INKLING_FAMILIES else "hy4" if family in HY4_FAMILIES else "qwen"
if not intel_app.route_here(kind):
fail("this model has no Intel Arc engine for this computer yet", "Linux runs every Intel route; Windows runs Ling-3.2-Air and Inkling-2-Mini; there is no Mac Intel engine")
if family in HY4_FAMILIES or family in INKLING_FAMILIES:
cards = intel_app.arc_cards()
if not cards:
@@ -10869,12 +10870,7 @@ def ling32_intel_cards(platform: str | None = None) -> list[dict]:
if platform.startswith("linux"):
return [dict(c) for c in intel_app.arc_cards()]
if platform.startswith("win"):
from strata_control import engine_component as ec
cards = []
for ad in ec.windows_display_adapters():
if ad.get("vendor") == "8086" and "arc" in str(ad.get("name", "")).lower() and float(ad.get("vram_gb") or 0) >= 4.0:
cards.append({"vendor": "intel", "name": str(ad["name"]), "vram_gb": float(ad["vram_gb"]), "usable": True, "index": len(cards)})
return cards
return intel_app.windows_arc_cards() # the same list the app's hardware report uses
except Exception: # noqa: BLE001 - a probe that fails lists nothing
pass
return []
+62 -6
View File
@@ -42,13 +42,68 @@ def model_files_in(folder, family: str, family_def: dict | None = None) -> list:
def supported_here(platform: str | None = None) -> bool:
"""Intel Arc engines ship for Linux x86_64 only (no Windows or Mac package in the feed)."""
"""The Intel Arc engines of the Qwen families ship for Linux x86_64 only (no Windows or Mac package in the feed)."""
return (platform or sys.platform).startswith("linux")
def arc_cards(root: str = "/sys/class/drm") -> list[dict]:
"""The Intel Arc cards in this Linux computer, as the Terminal lists them (strata_cli/launch/catalog.py intel_arc_cards): vendor "intel", name,
vram_gb (the card's own memory where it can be read, else the PCI id table's figure), usable True."""
#: THE Windows Intel switches, one per model family (0.2.25 scope, owner / coordinator 2026-12-03): Ling-3.2-Air has its own (ling32_family.SYCL_ENGINE_SHIPPED); Inkling-2-Mini ships on the Windows B70 (INK-B70 gated
#: f-ink-b70 e3b494577a on devcloud2: all five packs identical); Qwen3.8-Flash-Next waits for QFN-B70's B70 gate (flip when it passes); Hy4-Flash only if a gated Windows Intel engine exists. Linux is on for all.
INKLING_SYCL_WINDOWS_SHIPPED = True
QWEN_SYCL_WINDOWS_SHIPPED = False
HY4_SYCL_WINDOWS_SHIPPED = False
def route_here(kind: str, platform: str | None = None) -> bool:
"""Can the Intel Arc route of this model family (`kind`: "ling32", "inkling", "hy4", "qwen") run on this PC: Linux yes; Windows by the family's switch; a Mac never. Never raises."""
plat = platform or sys.platform
if plat.startswith("linux"):
return True
if not plat.startswith("win"):
return False
try:
from strata_control import ling32_family
return {"ling32": bool(ling32_family.sycl_available()), "inkling": bool(INKLING_SYCL_WINDOWS_SHIPPED), "hy4": bool(HY4_SYCL_WINDOWS_SHIPPED),
"qwen": bool(QWEN_SYCL_WINDOWS_SHIPPED)}.get(kind, False)
except Exception: # noqa: BLE001
return False
def cards_supported_here(platform: str | None = None) -> bool:
"""Is an Intel Arc card part of this computer's hardware report: Linux (the SYCL engines), and Windows when at least one family's Windows Intel engine ships (route_here)."""
plat = platform or sys.platform
if plat.startswith("linux"):
return True
return any(route_here(k, plat) for k in ("ling32", "inkling", "hy4", "qwen"))
def family_kind(md: dict | None) -> str:
"""The route kind of a model-table entry (strata_mcp): "ling32", "inkling", "hy4" or "qwen" (every other family)."""
md = md or {}
return "ling32" if md.get("ling32") else "inkling" if md.get("inkling") else "hy4" if md.get("hy4") else "qwen"
def windows_arc_cards(adapters=None) -> list[dict]:
"""The Intel Arc cards (discrete, with their own memory) of this Windows PC, from the display adapters' registry entries (engine_component.windows_display_adapters): vendor 8086, "Arc"
in the name, 4 GB of memory or more (an integrated Arc Graphics shares the system memory and is left out). The same list setup.py (ling32_intel_cards) uses to choose the SYCL engine.
Never raises: a failed probe lists nothing. `adapters`: a mocked list (tests)."""
try:
if adapters is None:
from strata_control import engine_component as ec
adapters = ec.windows_display_adapters()
cards = []
for ad in adapters:
if ad.get("vendor") == "8086" and "arc" in str(ad.get("name", "")).lower() and float(ad.get("vram_gb") or 0) >= 4.0:
cards.append({"vendor": "intel", "name": str(ad["name"]), "vram_gb": float(ad["vram_gb"]), "usable": True, "index": len(cards)})
return cards
except Exception: # noqa: BLE001 - a probe that fails lists nothing
return []
def arc_cards(root: str = "/sys/class/drm", platform: str | None = None) -> list[dict]:
"""The Intel Arc cards of this computer, as the Terminal lists them: Linux from the kernel's device list (strata_cli/launch/catalog.py intel_arc_cards), Windows from the display adapters
(windows_arc_cards): vendor "intel", name, vram_gb (the card's own memory where it can be read, else the PCI id table's figure), usable True."""
if str(platform or sys.platform).startswith("win"):
return windows_arc_cards()
from strata_cli.launch.catalog import intel_arc_cards
return intel_arc_cards(root)
@@ -63,11 +118,12 @@ def engine_is_intel() -> bool:
def cards_to_add(nvidia: list[dict], amd: list[dict], *, platform: str | None = None, cards=None, intel_engine=None) -> list[dict]:
"""The Arc cards to put in the hardware report beside `nvidia` and `amd`: none when either make has a usable card (those PCs are exactly what they
were), none off Linux, none when the engine is not the Intel one. Never raises: a probe that fails adds nothing."""
if not supported_here(platform):
if not cards_supported_here(platform):
return []
if any(g.get("usable") for g in nvidia) or any(g.get("usable") for g in amd):
return []
cards, intel_engine = cards or arc_cards, intel_engine or engine_is_intel
plat = platform or sys.platform
cards, intel_engine = cards or (windows_arc_cards if plat.startswith("win") else arc_cards), intel_engine or engine_is_intel
try:
found = cards()
if not found or not intel_engine():
@@ -48,8 +48,11 @@ class CardList(unittest.TestCase):
self.assertEqual(self.add([], [AMD]), [])
self.assertEqual(self.add([NVIDIA], [AMD]), [])
def test_only_linux_and_only_when_the_engine_is_the_intel_one(self):
self.assertEqual(self.add([], [], platform="win32"), []) # no Windows Intel engine in the feed
def test_only_linux_and_windows_with_ling_and_only_when_the_engine_is_the_intel_one(self):
self.assertEqual([c["name"] for c in self.add([], [], platform="win32")], ["Intel Arc A750"]) # Windows: the Ling Intel engine ships (ling32_family.SYCL_ENGINE_SHIPPED)
from strata_control import ling32_family
with mock.patch.object(ling32_family, "SYCL_ENGINE_SHIPPED", False), mock.patch.object(intel_app, "INKLING_SYCL_WINDOWS_SHIPPED", False):
self.assertEqual(self.add([], [], platform="win32"), []) # every Windows switch off: no Windows Intel engine
self.assertEqual(self.add([], [], platform="darwin"), [])
self.assertEqual(self.add([], [], intel=False), []) # the engine Control would pick is not SYCL (STRATA_ENGINE_BACKEND, a saved choice)
self.assertEqual(self.add([], [], cards=()), [])
@@ -74,6 +77,70 @@ class CardList(unittest.TestCase):
self.assertEqual([g["name"] for g in s.engine_gpus(hw)], ["Intel Arc A750"])
B70_ADAPTERS = [{"vendor": "8086", "device": 0xE223, "name": "Intel(R) Arc(TM) Pro B70 Graphics", "vram_gb": 32.0},
{"vendor": "8086", "device": 0x7D55, "name": "Intel(R) Arc(TM) Graphics", "vram_gb": 0.12}] # the card and the integrated one (left out)
class WindowsIntel(unittest.TestCase):
"""A Windows PC with an Intel Arc Pro B70 (the app run of GUI-LING on devcloud2: the hardware report listed no GPU, so the Ling row said cuda / no_card and the engine ran with no card-aware plan)."""
def test_the_windows_intel_routes_follow_each_familys_switch(self):
self.assertTrue(intel_app.route_here("ling32", "win32")) # Ling-3.2-Air ships on Windows Intel (ling32_family.SYCL_ENGINE_SHIPPED)
self.assertTrue(intel_app.route_here("inkling", "win32")) # Inkling-2-Mini: INK-B70 gated it on the Windows B70
self.assertFalse(intel_app.route_here("qwen", "win32")) # waits for QFN-B70's B70 gate
self.assertFalse(intel_app.route_here("hy4", "win32")) # no gated Windows Hy4 engine
self.assertFalse(intel_app.route_here("inkling", "darwin"))
for kind in ("ling32", "inkling", "hy4", "qwen"):
self.assertTrue(intel_app.route_here(kind, "linux"), kind)
with mock.patch.object(intel_app, "QWEN_SYCL_WINDOWS_SHIPPED", True):
self.assertTrue(intel_app.route_here("qwen", "win32")) # one word turns the Windows Qwen route on
with mock.patch.object(intel_app, "INKLING_SYCL_WINDOWS_SHIPPED", False):
self.assertFalse(intel_app.route_here("inkling", "win32"))
self.assertEqual([intel_app.family_kind(m) for m in ({"ling32": True}, {"inkling": True}, {"hy4": True}, {})], ["ling32", "inkling", "hy4", "qwen"])
def test_the_windows_model_rows_offer_only_the_routes_that_can_run(self):
s = M.Strata(ROOT)
hw = {"ram_gb": 64.0, "gpus": [{"vendor": "intel", "name": "Intel(R) Arc(TM) Pro B70 Graphics", "vram_gb": 32.0, "usable": True, "index": 0, "id": "intel:0"}], "engine_vendor": "intel", "cpu": {"avx2": True}}
import types
with mock.patch.object(intel_app, "sys", types.SimpleNamespace(platform="win32")):
rows = {r["family"]: r for r in s.model_table(hw)}
def offered(family):
return [x.get("offered", True) for x in rows[family]["sizes"]]
self.assertTrue(all(offered("qwen")) is False and not any(offered("qwen"))) # Qwen: not offered on a Windows Arc PC (no Windows engine yet)
self.assertTrue(any("Linux" in str(x.get("offered_note")) for x in rows["qwen"]["sizes"]))
if "inkling-2-mini" in rows:
self.assertTrue(all(offered("inkling-2-mini"))) # Inkling: the owner's own Windows B70 work, offered
if "ling-3.2-air" in rows:
self.assertTrue(all(offered("ling-3.2-air")))
with mock.patch.object(intel_app, "sys", types.SimpleNamespace(platform="linux")): # Linux: everything as before
linux = {r["family"]: r for r in s.model_table(hw)}
self.assertTrue(all(x.get("offered", True) for x in linux["qwen"]["sizes"]))
def test_the_windows_adapters_give_the_arc_card_with_its_memory(self):
cards = intel_app.windows_arc_cards(B70_ADAPTERS)
self.assertEqual([(c["vendor"], c["name"], c["vram_gb"], c["index"]) for c in cards], [("intel", "Intel(R) Arc(TM) Pro B70 Graphics", 32.0, 0)])
self.assertEqual(intel_app.windows_arc_cards([]), [])
def test_the_hardware_report_of_a_windows_arc_pc_carries_the_card_and_the_ling_row_follows_it(self):
s = M.Strata(ROOT)
S = s.setup_module()
import types
with mock.patch.object(intel_app, "sys", types.SimpleNamespace(platform="win32")), mock.patch.object(M, "WIN", True), \
mock.patch.object(S, "gpus", lambda: []), mock.patch.object(S, "amd_gpus", lambda: []), \
mock.patch.object(M, "windows_video_controllers", lambda: []), mock.patch.object(M, "windows_desktop_adapters", lambda: []), \
mock.patch("strata_control.engine_component.windows_display_adapters", lambda: [dict(x) for x in B70_ADAPTERS]), \
mock.patch.object(intel_app, "engine_is_intel", lambda: True), \
mock.patch("strata_control.engine_component.status", lambda: {"usable": False}):
hw = s._hardware()
self.assertEqual([(g["vendor"], g["vram_gb"], g["id"]) for g in hw["gpus"]], [("intel", 32.0, "intel:0")])
self.assertEqual(hw["engine_vendor"], "intel")
row = s.ling32_fit_row("SQ-96", 32.0, s.engine_gpus(hw))
self.assertIsNotNone(row)
self.assertEqual(row["tier"], "C") # a 32 GB card with 32 GB of RAM: the pool layout, tier C
self.assertGreater(row["placement"]["vram_gb"], 20.0) # the card's memory is in the plan (it was 0.15 GB with no card)
self.assertFalse([w for w in row["warnings"] if "no engine yet" in w])
class Recommendation(unittest.TestCase):
def test_an_arc_is_a_sycl_pc_and_says_there_is_no_download(self):
s = M.Strata(ROOT)
+23 -7
View File
@@ -573,6 +573,15 @@ def system_folders() -> list[Path]:
# ------------------------------------------------------------------------------------------------ Strata
def _intel_route_here(md: dict | None = None) -> bool:
"""Can the Intel route of this model family run on this PC (strata_control/intel_app.py route_here: Linux, or the family's Windows switch)? Never raises."""
try:
from strata_control import intel_app
return bool(intel_app.route_here(intel_app.family_kind(md)))
except Exception: # noqa: BLE001
return True
class Strata:
"""One Strata folder: what is installed there, the PC, and the processes this server started."""
@@ -750,7 +759,9 @@ class Strata:
vram_gib, ram_gib, unified = None, float(uma.get("vram_gb") or ram) / ling32_fit.GIB_TO_GB, True
else:
vram_gib, ram_gib, unified = max((float(g["vram_gb"]) for g in usable), default=0.0), float(ram), False
adv = ling32_fit.advise(vram_gib, ram_gib, unified=unified, ctx=ctx, vision=vision)
vendor = str(next((g.get("vendor") for g in usable if g.get("vendor")), "") or "").lower()
backend = {"amd": "hip", "intel": "sycl", "apple": "metal"}.get(vendor, "cuda") # the chunk and the words of the card's engine (an Intel card: the SYCL engine, pictures read on the processor in the plan)
adv = ling32_fit.advise(vram_gib, ram_gib, unified=unified, ctx=ctx, vision=vision, vision_device="cpu" if backend == "sycl" else "auto", backend=backend)
p = adv["plan"]
return {"tier": adv["tier"], "placement": {"vram_gb": p["vram_gb"], "ram_gb": p["ram_gb"], "ssd_gb": p["ssd_gb"]}, "mode": "cross_tier_ssd" if p["mode"] == "C" else "ram_vram_zero_ssd",
"speed": adv["speed"], "recommended": True, "unified": unified, "context": p["ctx"], "warnings": adv["warnings"], "feasible": bool(p["ok"]), "vision": p["vision"]}
@@ -1412,7 +1423,7 @@ class Strata:
except Exception: # noqa: BLE001 - an older Control folder: no field, the app keeps its own floor
pass
arc = []
if not WIN: # an Intel Arc (Linux, the SYCL engine): only a PC with no usable NVIDIA or AMD card gets one (strata_control/intel_app.py)
if True: # an Intel Arc (the SYCL engine; Linux, and Windows since Ling on Intel ships): only a PC with no usable NVIDIA or AMD card gets one (strata_control/intel_app.py cards_to_add decides the platform)
try:
if str(self.src) not in sys.path:
sys.path.insert(0, str(self.src))
@@ -1591,7 +1602,7 @@ class Strata:
hy4 = self.hy4_fit_row(m, ram if ram else None, usable)
verdict = None if hy4 is None else ("may run slower" if hy4["mode"] == "cross_tier_ssd" else "fits")
on_disk, rem_gb = (False, None) if tag in have else self._local_build_status(S, f, m, d, fd)
sizes.append({"model": m, "about": d["about"], "download_gb": d["download_gb"],
sizes.append({"model": m, "about": d["about"], "download_gb": d["download_gb"],
**({"hy4": hy4} if hy4 else {}),
**({"files_on_disk": True, "remaining_download_gb": rem_gb} if on_disk else {}),
"experimental": False, "images": True,
@@ -1773,7 +1784,9 @@ class Strata:
memory_gb, fit_gb = d["footprint_gb"], d["footprint_gb"]
ink = self.inkling_fit_row(m, ram, usable)
verdict = None if ink is None else ("may run slower" if ink["mode"] == "cross_tier_ssd" else "fits")
intel_blocked = any(g.get("vendor") == "intel" for g in usable) and not _intel_route_here(d)
sizes.append({"model": m, "about": d["about"], "download_gb": d["download_gb"],
**({"offered": False, "offered_note": "No Intel Arc engine for Windows yet for this model: it runs on Linux; Ling-3.2-Air and Inkling-2-Mini run on an Arc card on Windows."} if intel_blocked else {}),
**({"hy4": hy4} if hy4 else {}),
**({"inkling": ink} if ink else {}),
**({"ling32": ling} if ling else {}),
@@ -2884,13 +2897,16 @@ class Tools:
arc = backend == "sycl" or (backend in (None, "auto") and any(g.get("vendor") == "intel" for g in hw.get("gpus", [])))
if arc:
from strata_control import intel_app
if mac or not intel_app.supported_here() or not any(g.get("vendor") == "intel" for g in hw.get("gpus", [])):
raise ToolError("no Intel Arc card Strata can use was found in this computer (the Intel Arc engine runs on Linux)")
if not intel_app.can_set_up(family, families[family]):
ling_arc = bool(md.get("ling32")) # Ling-3.2-Air: its own Intel engine (setup.py routes it before the GGUF route)
if mac or not any(g.get("vendor") == "intel" for g in hw.get("gpus", [])):
raise ToolError("no Intel Arc card Strata can use was found in this computer")
if not intel_app.route_here(intel_app.family_kind(md)):
raise ToolError(f"{families[family]['title']} has no Intel Arc engine for Windows yet (it runs on Linux); Ling-3.2-Air and Inkling-2-Mini run on an Arc card on Windows")
if not ling_arc and not intel_app.can_set_up(family, families[family]):
raise ToolError(f"{families[family]['title']} {model} can't be set up for an Intel Arc card yet; "
"the Qwen3.8-Flash-Next, Swift, Coder, Gyro, Unsloth, Hy4-Flash and Inkling-2-Mini sizes can")
backend = "sycl"
if not md.get("hy4") and not md.get("inkling"):
if not md.get("hy4") and not md.get("inkling") and not md.get("ling32"):
vision = "no" # pictures stay off on an Arc for GGUF families (strata_cli/launch/adopt.py)
if not gguf_dir and not intel_app.model_files_in(have_dir, family, families[family]):
raise ToolError(intel_app.NO_DOWNLOAD)
+8 -3
View File
@@ -117,8 +117,13 @@ class VendorNotices(unittest.TestCase):
self.assertTrue(notice.startswith("Intel oneAPI runtime libraries"))
self.assertIn("libiomp5.so <- " + str(iomp), notice)
self.assertNotIn("libstdc++", notice)
self.assertEqual((out / "licenses" / "intel-oneapi-license.txt").read_text(encoding="utf-8"), "INTEL LICENSE TEXT\n")
self.assertEqual((out / "licenses" / "intel-oneapi-third-party-programs.txt").read_text(encoding="utf-8"), "THIRD PARTY TEXT\n")
# the licence texts are the CHECKED-IN set of tools/packaging/notices/intel-oneapi/<platform>/ (never the build machine's: a package must not depend on it), byte for byte
import lib_notices
texts = lib_notices.intel_license_files("linux")
self.assertTrue(texts)
for src in texts:
self.assertEqual((out / "licenses" / src.name).read_bytes(), src.read_bytes(), src.name)
self.assertFalse((out / "licenses" / "intel-oneapi-license.txt").exists()) # the installation's own licence files are no longer copied
def test_add_notices_writes_licenses_for_a_staging_folder(self):
import tempfile
@@ -133,7 +138,7 @@ class VendorNotices(unittest.TestCase):
(root / "licensing" / "2026.1" / "license.txt").write_text("L\n", encoding="utf-8")
wrote = add_notices.add(stage, [str(root)])
self.assertIn("licenses/intel-oneapi.txt", wrote)
self.assertIn("licenses/intel-oneapi-license.txt", wrote)
self.assertIn("licenses/intel-oneapi-license.htm", wrote) # a checked-in oneAPI licence text (tools/packaging/notices/intel-oneapi/)
self.assertIn("licenses/microsoft-vc-runtime.txt", wrote)
text = (stage / "licenses" / "intel-oneapi.txt").read_text(encoding="utf-8")
self.assertIn("libiomp5.so", text)