From b60fbb54f7d4b05c9dfa797d3eca34d38ce7f327 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Fri, 30 Oct 2026 19:20:29 +0100 Subject: [PATCH] serve: the parallel stack default is Linux CUDA only (HIP and Windows get nothing: no measurement outside the replica config) --- serve/server.py | 12 +++++------- serve/test_parallel.py | 5 +---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/serve/server.py b/serve/server.py index 1db90f4c..b245ecd2 100644 --- a/serve/server.py +++ b/serve/server.py @@ -3677,9 +3677,8 @@ PARALLEL_STACK_ENV = { "STRATA_SLOT_COPY_BATCHSYNC": "1", "STRATA_BATCH_GDN_GROUPS": "1", "STRATA_BATCH_ATTN_ROWS": "1", "STRATA_BATCH_SELF_COMMIT": "1", "STRATA_QSA_SLOTS": "1", } -# Only where the stack was run: Linux CUDA all nine; Linux HIP seven (the two one-launch-for-all-rows switches were not run there); -# nothing on Windows (no run; its host-arena / pinned-memory path differs). -PARALLEL_STACK_NOT_HIP = ("STRATA_BATCH_GDN_GROUPS", "STRATA_BATCH_ATTN_ROWS") +# Only where the stack was run alone: Linux CUDA, all nine. HIP got no measurement without replicas (its only run was inside the +# replica config), Windows none at all (its host-arena / pinned-memory path differs): nothing there. def parallel_slots(cfg: dict) -> int: @@ -3696,7 +3695,7 @@ def parallel_slots(cfg: dict) -> int: def parallel_stack_platform() -> bool: - """Linux only: the stack was run on Linux CUDA and HIP; Windows (own host-arena path) and macOS were not.""" + """Linux only: the stack was run on Linux CUDA; Windows (own host-arena path) and macOS were not.""" return sys.platform.startswith("linux") @@ -3707,10 +3706,9 @@ def parallel_stack_env(env: dict, cfg: dict) -> None: return if not parallel_stack_platform(): return - hip = cfg.get("backend") == "hip" + if cfg.get("backend") == "hip": + return for k, v in PARALLEL_STACK_ENV.items(): - if hip and k in PARALLEL_STACK_NOT_HIP: - continue env.setdefault(k, v) diff --git a/serve/test_parallel.py b/serve/test_parallel.py index 497972ae..a7eee29c 100644 --- a/serve/test_parallel.py +++ b/serve/test_parallel.py @@ -826,10 +826,7 @@ class ParallelStackDefaults(unittest.TestCase): hip = self.env_for({"parallel": 8, "args": [], "backend": "hip"}) for k, v in server.PARALLEL_STACK_ENV.items(): self.assertEqual(env.get(k), v, k) - if k in server.PARALLEL_STACK_NOT_HIP: - self.assertNotIn(k, hip) # HIP: the stack as it was run (seven switches) - else: - self.assertEqual(hip.get(k), v, k) + self.assertNotIn(k, hip) # HIP: nothing (no measurement without replicas) self.assertEqual(self.env_for({"args": ["--batch", "4"]}).get("STRATA_BATCH_SELF_COMMIT"), "1") def test_off_on_windows_and_mac(self):