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++

bench and monitor: name the GPUs the engine uses - mixed cards one by one in the report, the server's own card when it is not an NVIDIA one, the Intel reader first on the SYCL server (#2062 #2001)

Niko1221905a60588b9e
diff --git a/sycl/serve/server_intel.py b/sycl/serve/server_intel.py
index 1b775c5d8..baae26c23 100644
--- a/sycl/serve/server_intel.py
+++ b/sycl/serve/server_intel.py
@@ -5,7 +5,7 @@
Every argument is serve/server.py's. Nothing in serve/ is edited (the SYCL port keeps out of the shared files so
upstream merges stay clean); this wrapper adds, at run time:
- - the Monitor tab's GPU readings on an Intel Arc (sycl/serve/xe_telemetry.py) when no NVIDIA card answers;
+ - the Monitor tab's GPU readings on an Intel Arc (sycl/serve/xe_telemetry.py) (also on a PC with an NVIDIA card: the engine runs on the Intel one);
- a model menu in the web app's header, for a host that swaps models on one GPU: the config names the RPC that
does the swap as "model_switcher" (it takes {"mode": m} and answers {"mode", "up", "starting", "choices",
"urls"}); the menu offers the models served on this server's port. Without that key nothing changes;
@@ -35,15 +35,14 @@ from xe_telemetry import _XeGpu # noqa: E402
def install_xe_reader():
- """telemetry.gpu_reader -> the xe reader when NVML has no card and an Intel Arc is there."""
+ """telemetry.gpu_reader -> the xe reader whenever an Intel Arc is there. #2001: this server runs the SYCL engine,
+ so the cards it reports are the Intel ones; before, an NVIDIA card in the same PC answered first and the Monitor
+ (and the benchmark report, which takes the card's name from it) showed the GeForce the engine never used."""
orig = T.gpu_reader
def gpu_reader(index=0, amd=False):
- g = orig(index, amd)
- if g.ok():
- return g
xe = _XeGpu(index)
- return xe if xe.ok() else g
+ return xe if xe.ok() else orig(index, amd)
T.gpu_reader = gpu_reader
diff --git a/sycl/serve/xe_telemetry.py b/sycl/serve/xe_telemetry.py
index 3eb3b61ab..137667e9a 100644
--- a/sycl/serve/xe_telemetry.py
+++ b/sycl/serve/xe_telemetry.py
@@ -12,6 +12,12 @@ import sys
import time
+# the cards sycl/setup_intel.py names by PCI id (INTEL_ARC)
+ARC_NAMES = {"e223": "Arc Pro B70", "e221": "Arc Pro B60", "e211": "Arc Pro B60", "e20b": "Arc B580", "e20c": "Arc B570",
+ "e212": "Arc B50", "56a0": "Arc A770", "56a1": "Arc A750", "56a2": "Arc A580", "56a5": "Arc A380",
+ "56a6": "Arc A310", "5690": "Arc A770M"}
+
+
class _XeGpu:
"""The Intel Arc readings in NVML's shape. Load and VRAM come from /run/gpustat.json (a root sampler: the only
VRAM accounting xe exposes is per-client fdinfo, readable by root only); temperature, power and the PCIe link are
@@ -21,13 +27,15 @@ class _XeGpu:
def __init__(self, index=0):
import glob
self.dev = None
+ cards = [] # #2001: the Intel cards in sysfs order, as setup numbers them
for d in sorted(glob.glob("/sys/class/drm/card[0-9]*/device")):
try:
if open(f"{d}/vendor").read().strip() == "0x8086" and os.path.isdir(f"{d}/tile0"):
- self.dev = os.path.realpath(d)
- break
+ cards.append(os.path.realpath(d))
except OSError:
continue
+ if 0 <= index < len(cards):
+ self.dev = cards[index]
self.hwmon = None
for n in glob.glob(f"{self.dev}/hwmon/hwmon*/name") if self.dev else []:
self.hwmon = os.path.dirname(n)
@@ -38,7 +46,13 @@ class _XeGpu:
def name(self):
st = self._stat()
- return (st or {}).get("name") or "Intel Arc GPU"
+ if (st or {}).get("name"):
+ return st["name"]
+ try: # the PCI id's name (setup_intel.INTEL_ARC), not a generic one
+ with open(f"{self.dev}/device") as f:
+ return "Intel " + ARC_NAMES.get(f.read().strip().lower().replace("0x", ""), "Arc GPU")
+ except (OSError, TypeError):
+ return "Intel Arc GPU"
def _stat(self):
try:
diff --git a/tools/strata_bench.py b/tools/strata_bench.py
index 557af920e..ac9d39b20 100644
--- a/tools/strata_bench.py
+++ b/tools/strata_bench.py
@@ -606,7 +606,14 @@ def collect_machine(base: str, key: str, cfg: dict | None, gpu_arg: str | None =
gpu_names = [g["name"] for g in used] or ([static["gpu_name"]] if static.get("gpu_name") else [])
m = status.get("machine") or {}
vram_mib = (m.get("gpu") or {}).get("total_mib") or None
- if used and used[0].get("vram_mib"):
+ # #2001: the server names the cards it reads (" + " between them). A name nvidia-smi does not list means the
+ # engine runs on another vendor's card (an Intel Arc beside a GeForce): the server's names are the right ones, and
+ # so is its VRAM total - the PC's NVIDIA cards were not used.
+ served = [n for n in (static.get("gpu_name") or "").split(" + ") if n and n != "?"]
+ if served and not all(n in {g["name"] for g in local["gpus"]} for n in served):
+ gpu_names, used = served, []
+ local = {**local, "cuda": None} # the PC's CUDA belongs to cards the engine did not use
+ elif used and used[0].get("vram_mib"):
vram_mib = sum(g.get("vram_mib") or 0 for g in used)
n_ctx = None
for d in models.get("data") or []:
@@ -702,9 +709,19 @@ def gpu_slug(machine: dict) -> str:
names = machine.get("gpu") or []
if not names:
return "cpu"
- n = re.sub(r"(?i)\b(nvidia|geforce|amd|radeon|intel|graphics|corporation)\b", " ", names[0])
- s = slug(n, 30)
- return s if len(names) == 1 else f"{len(names)}x-{s}"
+ # #2062: the cards one by one when they differ (rtx-5070-ti-plus-rtx-a4000), "2x-" only for identical ones
+ groups: list[list] = [] # [name, count], in the order the cards are listed
+ for name in names:
+ same = next((g for g in groups if g[0] == name), None)
+ if same:
+ same[1] += 1
+ else:
+ groups.append([name, 1])
+ parts = []
+ for name, count in groups:
+ n = re.sub(r"(?i)\b(nvidia|geforce|amd|radeon|intel|graphics|corporation)\b", " ", name)
+ parts.append(slug(n, 30) if count == 1 else f"{count}x-{slug(n, 30)}")
+ return "-plus-".join(parts)[:80].strip("-")
def model_label(machine: dict) -> str:
diff --git a/tools/test_strata_bench.py b/tools/test_strata_bench.py
index 80fc2d70e..d0449f686 100644
--- a/tools/test_strata_bench.py
+++ b/tools/test_strata_bench.py
@@ -276,6 +276,26 @@ class ReportTests(unittest.TestCase):
self.assertEqual(B.gpu_selection({"gpu": "0,2"}), [0, 2])
self.assertEqual(B.gpu_selection({}, None), [])
+ def test_the_slug_names_mixed_cards_one_by_one(self):
+ """#2062: two different cards are not N copies of the first."""
+ a, b = "NVIDIA GeForce RTX 5070 Ti", "NVIDIA RTX A4000"
+ self.assertEqual(B.gpu_slug({"gpu": [a]}), "rtx-5070-ti")
+ self.assertEqual(B.gpu_slug({"gpu": [a, b]}), "rtx-5070-ti-plus-rtx-a4000")
+ self.assertEqual(B.gpu_slug({"gpu": [b, a]}), "rtx-a4000-plus-rtx-5070-ti")
+ self.assertEqual(B.gpu_slug({"gpu": [b, b]}), "2x-rtx-a4000")
+ self.assertEqual(B.gpu_slug({"gpu": [b, a, b]}), "2x-rtx-a4000-plus-rtx-5070-ti")
+
+ def test_a_card_the_pc_s_nvidia_smi_does_not_list_is_the_servers_own(self):
+ """#2001: the engine on an Intel Arc beside a GeForce: the report names the Arc (the name the server reads)."""
+ srv = FakeStrata()
+ self.addCleanup(srv.stop)
+ nv = {"gpus": [{"name": "NVIDIA GeForce RTX 3080 Ti", "vram_mib": 12288, "driver": "560.1"}], "cuda": "12.6"}
+ with mock.patch.object(B, "gpu_info_local", return_value=nv), mock.patch.object(
+ B, "try_json", side_effect=lambda base, path, *a, **k: (
+ {"hardware_static": {"gpu_name": "Intel Arc Pro B70"}} if path == "/metrics" else {})):
+ m = B.collect_machine(srv.base, "", {"backend": "sycl"})
+ self.assertEqual((m["gpu"], m["cuda"]), (["Intel Arc Pro B70"], None))
+
def test_names(self):
m = {"gpu": ["NVIDIA GeForce RTX 3060"], "model": "Qwen3.8 Flash-Next", "quant": "IQ3_XXS"}
self.assertEqual(B.results_dir_name(m, "2026-10-10"), "2026-10-10-community-rtx-3060-qwen3-8-flash-next-iq3-xxs")