This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/tests
sfjes 73620ef00e sched: a prefix hit on a windowed TRUNK re-prefills — reuse cannot cover a group the cache does not index
prefix.cpp indexes the RAD_KV_FULL groups and skips RAD_KV_WINDOW (its own
words: "a hit's blocks do not describe a cache whose floor moves" — the
blocks below the window are recycled). admit_one clamped a hit for the
linear/checkpoint cases; a model whose own attention includes a group the
cache skips — every windowed+full pair — passed every clamp, reused, and
adopted blocks covering the CACHED groups only. The windowed trunk layers
take used = ctx_len + n_tokens (batch.cpp) and read positions below
ctx_len this sequence never wrote; grab_block's min-heap (kv.cpp) hands
out the most recently freed blocks, i.e. the previous tenant's. The
sequence attends to the PREVIOUS REQUEST'S KV as its own prefix: fluent
text carrying the last request's content. Reproduced on a live server
with sequential prompts (A-B-C-A-B: the re-run of A reads C's prompt),
and it is why a windowed model with the prefix cache on cannot currently
serve more than one conversation at a time.

The fix is a second predicate next to the drafter floor, computed once
in init(): a paged group bound to a TRUNK layer (below meta.n_layers —
a drafter borrows from base_layer and above, per rad_bind_layer_kv) that
cached_groups() does not name. In admit_one, a hit with such a hole
reuses nothing: the prefix re-prefills (windowed prompts are small;
milliseconds). The drafter's own hole stays the refill design's —
HitCap ends the hit one drafter window before the prompt's end so the
tail-recompute covers the drafter's window while the trunk reuses the
rest (the e95d397 tests keep passing, all of them); no tail-recompute
can repair a trunk hole, which is why zero is the honest answer there.

sched_test gains an opt-in WINDOW group in the fixture (bound to a
trunk layer) and a_hit_on_a_model_with_a_windowed_group_reuses_nothing:
a deep, checkpoint-covered hit — legal under every other clamp — on a
cache indexing only the FULL group. Reuse lands at 0, nothing is
adopted, and attn_cached_tokens still reports the 304-token match: the
cache hit and the scheduler refused it. Disable the clamp and the hit
adopts 16 blocks of the seeded (previous tenant's) KV — n_computed 256,
the leak as shipped; that is the regression net.

Box: ctest lane + A-B-C-A-B battery green (evidence in the PR body).
2026-10-09 23:13:26 -07:00
..
2026-10-08 18:22:08 +02:00
2026-10-06 14:04:49 +02:00
2026-10-07 22:42:45 +02:00
2026-10-08 18:22:08 +02:00
2026-10-04 12:02:41 +02:00
2026-10-08 18:22:08 +02:00
2026-10-08 18:22:08 +02:00
2026-10-06 14:43:46 +02:00
2026-10-08 18:22:08 +02:00
2026-10-06 14:43:46 +02:00
2026-10-04 12:02:41 +02:00
2026-10-07 12:37:53 +02:00
2026-10-06 14:04:49 +02:00
2026-10-06 14:04:49 +02:00
2026-10-06 14:04:49 +02:00
2026-10-04 12:02:41 +02:00
2026-10-08 18:22:08 +02:00
2026-10-04 12:02:41 +02:00
2026-10-08 18:22:08 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-08 18:22:08 +02:00
2026-10-07 12:37:53 +02:00
2026-10-08 18:22:08 +02:00
2026-10-08 18:22:08 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 12:02:41 +02:00
2026-10-08 18:22:08 +02:00
2026-10-05 14:01:30 +02:00
2026-10-08 18:22:08 +02:00
2026-10-08 18:22:08 +02:00
2026-10-06 14:04:49 +02:00
2026-10-06 21:36:24 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 18:44:29 +02:00
2026-10-04 12:02:41 +02:00
2026-10-04 20:07:08 +02:00
2026-10-04 12:02:41 +02:00
2026-10-05 12:16:54 +02:00
2026-10-08 18:22:08 +02:00
2026-10-07 12:37:53 +02:00