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: write the gfx1150 speed switches for the opt-in install
Niko122101e1bc5c0e4d
diff --git a/setup.py b/setup.pyindex c7fecd080..ee9a932d7 100644--- a/setup.py+++ b/setup.py@@ -2119,6 +2119,11 @@ GFX1103_SWITCHES = {"STRATA_EXPERT_V2": "1", "STRATA_TSUM": "1", "STRATA_LFUSE": "1", "STRATA_GDN_SPLIT": "1","STRATA_QFUSE": "1", "STRATA_PLE_BATCH": "1", "STRATA_SH_STREAM": "1",}+# The same set for a gfx1150 install (Radeon 890M / 880M): less STRATA_HCD_EXACT as well, because a gfx1150 table picks other+# solutions than the gfx1151 one. The Radeon 890M report (docs/AMD_HIP.md; bench/results/2026-10-07-community-gfx1150) measured the+# same greedy answers with all 17 on and with all 17 off, decode +2% and prompts +3-6%. The engine's arch defaults are not used+# for gfx1150 (src/core/arch_defaults_test.cpp asserts gfx1150 stays empty), so this keeps the default path byte-identical.+GFX1150_SWITCHES = dict(GFX1103_SWITCHES)AMD_NAMES = {"gfx1100": "AMD Radeon RX 7900 series (gfx1100)", # when sysfs has no product name"gfx1101": "AMD Radeon RX 7800 XT / 7700 XT (gfx1101)","gfx1102": "AMD Radeon RX 7600 / 7600 XT (gfx1102)",@@ -4469,7 +4474,7 @@ def write_config(path: Path, cfg: dict):SETUP_KEYS = frozenset({"exe", "args", "cwd", "tokenizer", "model_name", "log", "lib_dirs", "port", "backend", "env","gpu", "gpus_asked", "layer_split", "host", "api_key", "draft_vocab", "vision"})SETUP_ENV = frozenset({"STRATA_HIPBLASLT_TUNING", "STRATA_RESIDENT_PIN", "STRATA_NO_ARENA_THP", "STRATA_MMQ_KQ", "STRATA_HC_Q8",- "STRATA_ROUTE_TAIL_SKIP"}) | frozenset(GFX1103_SWITCHES) # the "env" entries setup writes (the gfx1103 switches are setup's too: a re-run refreshes them, they do not linger)+ "STRATA_ROUTE_TAIL_SKIP"}) | frozenset(GFX1103_SWITCHES) | frozenset(GFX1150_SWITCHES) # the "env" entries setup writes (the gfx1103 switches are setup's too: a re-run refreshes them, they do not linger)# 0.1.44 added these three, written for Unsloth's files only (unsloth_default_env). In any other model's config they are the# user's own (STRATA_ROUTE_TAIL_SKIP=0 to turn the tail skip off, STRATA_MMQ_KQ=1 ...): a setup run again keeps them there# (0.1.44 dropped them with the rest of SETUP_ENV).@@ -6801,6 +6806,11 @@ def main() -> int:# for gfx1103, so setup writes them into the config. They are setup's own (SETUP_ENV), so a re-run refreshes# them and turning the opt-in off takes them out again.cfg.setdefault("env", {}).update(GFX1103_SWITCHES)+ if GFX1150_OPT_IN and gfx_arch_is(gpu["arch"], "gfx1150"):+ # the exact gfx1151 speed switches measured on this chip (GFX1150_SWITCHES): the engine has no arch defaults+ # for gfx1150, so setup writes them into the config. They are setup's own (SETUP_ENV), so a re-run refreshes+ # them and turning the opt-in off takes them out again.+ cfg.setdefault("env", {}).update(GFX1150_SWITCHES)if resident: # ROCm: large page-locked host allocations can fail or be slow for the CPU; keep the copy pageablecfg.setdefault("env", {})["STRATA_RESIDENT_PIN"] = "0"if gpu["count"] > 1 or a.gpu is not None:diff --git a/tools/test_setup_strix_halo.py b/tools/test_setup_strix_halo.pyindex cd93ac5b7..adb62d044 100644--- a/tools/test_setup_strix_halo.py+++ b/tools/test_setup_strix_halo.py@@ -127,6 +127,25 @@ class Gfx1103Switches(unittest.TestCase):self.assertIn(k, setup.SETUP_ENV)+class Gfx1150Switches(unittest.TestCase):+ def test_is_the_gfx1151_defaults_less_hcd_exact(self):+ """GFX1150_SWITCHES is the gfx1151 arch-default set (src/core/arch_defaults.cpp) minus STRATA_HCD_EXACT, which+ copies the gfx1151 hipBLASLt table's solutions 1176 / 1177 and so does not apply beside a gfx1150 table. The+ engine keeps gfx1150 out of its own arch defaults (src/core/arch_defaults_test.cpp), so setup writes this set."""+ src = (ROOT / "src/core/arch_defaults.cpp").read_text(encoding="utf-8")+ tail = src.split("gfx_arch_is_gfx1151(gcn_arch)) return t;", 1)[1]+ block = tail.rsplit("t = {", 1)[1].split("};", 1)[0] # the gfx1151 switch table+ gfx1151 = dict(re.findall(r'\{"(STRATA_[A-Z0-9_]+)",\s*"([^"]+)"\}', block))+ self.assertIn("STRATA_HCD_EXACT", gfx1151) # the parse found the gfx1151 block+ self.assertEqual(setup.GFX1150_SWITCHES,+ {k: v for k, v in gfx1151.items() if k != "STRATA_HCD_EXACT"})+ self.assertNotIn("STRATA_HCD_EXACT", setup.GFX1150_SWITCHES)+ for k in setup.GFX1150_SWITCHES: # setup's own: a re-run refreshes them+ self.assertIn(k, setup.SETUP_ENV)+ self.assertIn('arch_default_env("gfx1150").empty()',+ (ROOT / "src/core/arch_defaults_test.cpp").read_text(encoding="utf-8"))++class PciIds(unittest.TestCase):def test_strix_halo_id(self):# pci.ids: one id for every Strix Halo part (8060S, 8050S, 8040S share it; they differ by CU count)