From 451b136874084650992668bed9e8662deb58de88 Mon Sep 17 00:00:00 2001 From: Code000 Date: Thu, 5 Nov 2026 20:21:33 +0100 Subject: [PATCH] tests: the preemption cases pin --prefill-interleave 0 The served default --prefill-interleave auto:1 (previous commit) follows measured step times, so the four sequences of preemption_by_recompute_continues_each_stream_exactly sometimes never overlapped enough to preempt and the test's CHECK(n > 0) failed in about half the runs under a loaded host (plain main: 6/6 pass). The cases are sized for the fixed schedule they were written against; small_pool_args() now pins it. Nothing they check is loosened: the streams must still match and preemption still happen. With the flag: 6/6 alone and 3/3 beside 40 busy threads, and the case takes 3 s again instead of 5-12 s. --- tests/engine_e2e_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/engine_e2e_test.cpp b/tests/engine_e2e_test.cpp index 08ef2870..287e32b0 100644 --- a/tests/engine_e2e_test.cpp +++ b/tests/engine_e2e_test.cpp @@ -85,9 +85,12 @@ std::vector serving_argv(const std::string& model, } /* The shape the preemption cases run in: four sequences of at most 512 tokens, 256 a step. Their - * small KV pool comes from a small device, whose size small_device() finds. */ + * small KV pool comes from a small device, whose size small_device() finds. --prefill-interleave 0 + * pins the schedule these cases are sized for: the bring-up default auto:1 follows measured step + * times, so on a loaded host the four sequences may never overlap enough to preempt. */ std::vector small_pool_args() { - return { "--max-num-seqs", "4", "--max-num-batched-tokens", "256", "--max-model-len", "512" }; + return { "--max-num-seqs", "4", "--max-num-batched-tokens", "256", "--max-model-len", "512", + "--prefill-interleave", "0" }; } std::vector device_env(int device_mib) { return { "RADIANCE_HOST_VRAM_MIB=" + std::to_string(device_mib) };