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

layer split overlap: off beside --pipeline-windows (#859)

bsvinaycbc1578a2f86
diff --git a/docs/MULTI_GPU.md b/docs/MULTI_GPU.md
index 0ee03e2eb..7cc0cc558 100644
--- a/docs/MULTI_GPU.md
+++ b/docs/MULTI_GPU.md
@@ -207,7 +207,7 @@ flag: the earlier stage's GPU writes the hand-off with volatile stores and raise
next stage's graph is staged and launched on a helper thread while the earlier stage is still running and waits for
the flag on its GPU (`wait_flag_ge`), and the host goes straight from serving one stage's layers to the next, syncing
the earlier stage only once the chain is done. It takes one stream sync and one graph launch per window off the
-critical path. Batch windows (several conversations) keep the serial order.
+critical path. Batch windows (several conversations) keep the serial order. It is off beside `--pipeline-windows`, whose loop overlaps the stages its own way.
Measured on 2x RX 7900 XTX (gfx1100, ROCm, Linux), Ryzen 9 9900X, 52 GB RAM, Swift 1.5 IQ3_XXS, 128K context, 8-bit
KV, layers 0-25 / 26-47; 512-token greedy answers, median of 8 runs:
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index b64155f4b..f766e8da9 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -7836,10 +7836,15 @@ int main(int argc, char** argv) {
// STRATA_SPLIT_OVERLAP=1 (opt-in; measured on 2x RX 7900 XTX only): a ready word per hand-off, raised by the
// writing stage's GPU, so the next stage's window is launched early and the host never syncs between
// stages (Verifier::set_handoff_flags). Not for --split-device 0 (both stages on one GPU).
- const bool overlap = !split_same && [] {
+ const bool overlap_asked = [] {
const char* v = std::getenv("STRATA_SPLIT_OVERLAP");
return v != nullptr && std::atoi(v) != 0;
}();
+ // --pipeline-windows (#859) runs its own overlapped loop with its own hand-offs: the two do not mix
+ const bool overlap = overlap_asked && !split_same && o.pipeline_windows == 0;
+ if (overlap_asked && o.pipeline_windows > 0)
+ std::fprintf(stderr, "strata serve: STRATA_SPLIT_OVERLAP is off beside --pipeline-windows %d "
+ "(that loop overlaps the stages itself)\n", o.pipeline_windows);
std::vector<uint32_t*> hflag_h((size_t) n_stages - 1, nullptr), hflag_d((size_t) n_stages - 1, nullptr);
if (overlap)
for (size_t i = 0; i < hflag_h.size(); ++i) {