From a86aa7476366163b7508fa0d662a3f95ff4429b0 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 12 Oct 2026 12:52:32 +0200 Subject: [PATCH] Tests: STRATA_TEST_PINNED_SHARE sets the pinned share the prompt ring rule reads (#2090 repro) --- src/program/generate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/program/generate.cpp b/src/program/generate.cpp index eeb842cb..5070952d 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -6287,7 +6287,9 @@ int main(int argc, char** argv) { total += b; if (srcp->pinned(l, e)) pinned += b; } - strata::prefill::Prefill::set_pinned_share(total ? (double) pinned / (double) total : 1.0); + double share = total ? (double) pinned / (double) total : 1.0; + if (const char* t = std::getenv("STRATA_TEST_PINNED_SHARE")) share = std::atof(t); // tests: the Windows-like ring rule + strata::prefill::Prefill::set_pinned_share(share); } // bytes -> slots for CUDA0's cache: exact when it knows its per-slot offsets (a native pack's blobs differ // per layer), otherwise max_blob each.