From 0d47295f5a4849dab3f5e1512cea27bc6427fbd1 Mon Sep 17 00:00:00 2001 From: SuperDistance <43229543+SuperDistance@users.noreply.github.com> Date: Tue, 13 Oct 2026 14:50:13 -0700 Subject: [PATCH] batch-groups: --remote-expert-opt without a helper cache does not keep the concurrent read off The flag works only through a helper cache (--expert-cache-device1..3), and on a plain layer split it is inert (MULTI_GPU.md, #1447), so the check looks at the helper caches themselves. #2275's rig runs a plain split with the flag set, and the mode would have stayed off there for a cache it does not have. --- include/strata/program/batch_read.hpp | 3 ++- src/program/generate.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/strata/program/batch_read.hpp b/include/strata/program/batch_read.hpp index d91afc1b..536e1cc3 100644 --- a/include/strata/program/batch_read.hpp +++ b/include/strata/program/batch_read.hpp @@ -33,7 +33,8 @@ struct ConcurrentReadSetup { bool split_mtp_batch = false; ///< STRATA_SPLIT_MTP_BATCH: the batched draft K/V frees there (a free waits) bool fs_slots = false; ///< STRATA_FS_SLOTS (Foresight swap space): serving a doorbell makes a CUDA call bool pcie_dma = false; ///< --pcie-mode dma: the same (its copies) - bool helper_caches = false; ///< --expert-cache-device1..3, a remote expert source, a prompt source of its own + bool helper_caches = false; ///< --expert-cache-device1..3 (and --remote-expert-opt on them), a prompt source of + ///< its own; --remote-expert-opt alone is inert on a plain layer split bool staged_source = false; ///< the GGUF source stages its blobs (in place, unbuffered, STRATA_IO_PREFETCH): ///< it recycles the buffers it hands out, one thread at a time bool other_source = false; ///< an expert source that is neither the GGUF source nor the arena diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 80148f49..a54192ae 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -11664,7 +11664,8 @@ int main(int argc, char** argv) { s.split_mtp_batch = env_on("STRATA_SPLIT_MTP_BATCH"); s.fs_slots = env_on("STRATA_FS_SLOTS"); s.pcie_dma = o.pcie_mode == "dma"; - s.helper_caches = o.remote_expert_opt || prefill_src != srcp; + // (--remote-expert-opt works only through a helper cache, so without one it does not count) + s.helper_caches = prefill_src != srcp; for (int r = 0; r < 3; ++r) s.helper_caches |= o.expert_cache_remote[(size_t) r] > 0; s.staged_source = srcp == &src && src.stages_blobs(); s.other_source = srcp != &src && srcp != &arena_src;