scheduler: --prefill-interleave auto:SHARE sets the decode-only share of a chunk step's time

auto gave decode-only steps a fixed quarter of a chunk step's time. On the device (8 decoding
sessions beside 64K prefills, MTP on) that left decode at 23 tokens/s a session against 83 alone,
with 0.45 s gaps: two or three decode steps of ~40 ms per 0.45 s chunk. auto:SHARE makes the share a
choice (0 < SHARE <= 4); auto stays 0.25. The cap on decode-only steps rises from 16 to 64 so a
larger share is not cut off. config_test parses it, sched_test checks auto:1.
This commit is contained in:
Code000 committed 2026-11-05 20:20:13 +01:00
1 parent 5a8c5533d1
commit c00b882b96
7 files changed
+43 -12

No files matched your search

+9
View File
@@ -465,6 +465,15 @@ TEST(prefill_interleave_takes_a_step_count_up_to_64) {
CHECK_EQ(parse({ "--prefill-interleave", "auto" }, &a), RAD_OK);
CHECK_EQ(a.prefill_interleave, -1);
CHECK_EQ(parse({ "--prefill-interleave", "automatic" }, &c), RAD_E_INVAL);
/* auto:SHARE gives decode-only steps SHARE of a chunk step's time, in (0, 4] */
Config h;
CHECK_EQ(parse({ "--prefill-interleave", "auto:1" }, &h), RAD_OK);
CHECK_EQ(h.prefill_interleave, -1);
CHECK(h.prefill_interleave_share == 1.0);
CHECK(a.prefill_interleave_share == 0.25);
CHECK_EQ(parse({ "--prefill-interleave", "auto:0" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--prefill-interleave", "auto:5" }, &c), RAD_E_INVAL);
CHECK_EQ(parse({ "--prefill-interleave", "auto:x" }, &c), RAD_E_INVAL);
}
/* ================================================================== the table, the parser and the help agree