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++
setup: the HIP ready-made-engine checks read gfx names with arch_names, not arch_numbers (an installed AMD engine was never recognised); tests for archs as a list and as a string
Niko1221f5f205bee0a0
diff --git a/setup.py b/setup.pyindex 974a7a977..c765cb80e 100644--- a/setup.py+++ b/setup.py@@ -4193,7 +4193,7 @@ def get_prebuilt_hip(url_base, gpu, updating=False) -> Path | None:meta = {}ver = tuple(int(x) for x in str(meta.get("version", "0")).split(".")[:4] if x.isdigit())if meta.get("backend") == "hip" and meta.get("source") == "prebuilt" and ver >= WIN_HIP_MIN_ENGINE and \- gpu["arch"] in arch_numbers(meta.get("archs")) and not updating:+ gpu["arch"] in arch_names(meta.get("archs")) and not updating:ok("ready-made AMD engine already installed")return engif not url_base:@@ -4235,11 +4235,11 @@ def get_prebuilt_hip(url_base, gpu, updating=False) -> Path | None:why = "it is not a HIP engine"elif ver < WIN_HIP_MIN_ENGINE:why = f"it is version {meta.get('version')}; this setup needs {'.'.join(map(str, WIN_HIP_MIN_ENGINE))}"- elif gpu["arch"] not in arch_numbers(meta.get("archs")):- why = (f"it is built for {', '.join(meta.get('archs', []))}; your GPU is {gpu['arch']}. A card it has no code "+ elif gpu["arch"] not in arch_names(meta.get("archs")):+ why = (f"it is built for {', '.join(arch_names(meta.get('archs')))}; your GPU is {gpu['arch']}. A card it has no code ""for runs from a self-build of the engine: see docs/AMD_HIP.md (--build)") # #881if is_strix_halo(gpu): # never a zip without gfx1151 code: say so, and what to do- why = (f"it is built for {', '.join(meta.get('archs', [])) or 'other GPUs'} and has no gfx1151 code: your "+ why = (f"it is built for {', '.join(arch_names(meta.get('archs'))) or 'other GPUs'} and has no gfx1151 code: your "f"{gpu['name']} (Strix Halo) needs a ready-made engine from Strata 0.1.40 or newer, whose zip is ""built for gfx1151 too. Until then: the Linux guide docs/STRIX_HALO.md, or compile the engine ""here with tools\\hip\\build_windows.bat (its default list has gfx1151) and start setup with "@@ -4253,7 +4253,7 @@ def get_prebuilt_hip(url_base, gpu, updating=False) -> Path | None:shutil.rmtree(tmp, ignore_errors=True)drop_archive(z)hip_runtime_beside_exe(eng) # #468 #461- ok(f"ready-made AMD engine {meta.get('version', '')} for {', '.join(meta.get('archs', []))} "+ ok(f"ready-made AMD engine {meta.get('version', '')} for {', '.join(arch_names(meta.get('archs')))} "f"(ROCm {meta.get('rocm', '?')})")return engdiff --git a/tools/test_setup_amd.py b/tools/test_setup_amd.pyindex 276653284..cd8536542 100644--- a/tools/test_setup_amd.py+++ b/tools/test_setup_amd.py@@ -430,6 +430,30 @@ class WindowsDetection(unittest.TestCase):(pub / setup.WIN_HIP_ASSET).unlink() # installed: kept, nothing downloaded againself.assertEqual(setup.get_prebuilt_hip(str(pub) + "/", {"arch": "gfx1201"}), eng)+ def test_prebuilt_hip_zip_archs_as_list_or_string(self):+ """#3810 review: gfx names are names, not numbers - an installed ready-made engine is recognised (no download again) and a zip+ is accepted whether BUILD.json writes archs as a list or as the ';'-separated string."""+ import json+ import zipfile+ for archs in (["gfx1100", "gfx1151"], "gfx1100;gfx1151"):+ with tempfile.TemporaryDirectory() as d:+ root = Path(d)+ pub = root / "pub"+ pub.mkdir()+ ver = ".".join(map(str, setup.WIN_HIP_MIN_ENGINE))+ meta = {"source": "prebuilt", "backend": "hip", "version": ver, "archs": archs, "lib_dirs": ["rocm/bin"]}+ with zipfile.ZipFile(pub / setup.WIN_HIP_ASSET, "w") as z:+ z.writestr(setup.EXE, "engine")+ z.writestr("strata-device.exe", "probe")+ z.writestr("rocm/bin/amdhip64_7.dll", "dll")+ z.writestr("BUILD.json", json.dumps(meta))+ with mock.patch.object(setup, "ROOT", root), mock.patch.object(setup, "say", lambda *a, **k: None), mock.patch.object(setup, "ok", lambda *a: None), mock.patch.object(setup, "warn", lambda *a: None):+ eng = setup.get_prebuilt_hip(str(pub) + "/", {"arch": "gfx1151"})+ self.assertEqual(eng, root / "engine", archs)+ (pub / setup.WIN_HIP_ASSET).unlink() # installed: recognised, nothing downloaded again+ self.assertEqual(setup.get_prebuilt_hip(str(pub) + "/", {"arch": "gfx1151"}), eng, archs)+ self.assertEqual(setup.engine_archs_hip(), ["gfx1100", "gfx1151"], archs)+_HIP_DEVICES = setup.hip_devices # the real parser, for the tests that mock setup.hip_devices