mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-04 23:38:47 +00:00
conversation checkpoints: a layer split's stale parts go when the prompt read ends (#6011 follow-up)
A layer split's mid-prompt checkpoint is put together from one part per stage (part_at), each saved when that stage reaches the position; the last stage's chunk report assembles a complete set. A cancelled read (more often now that every stage sees STOP, #6011) leaves the first stages' parts past the last chunk the last stage reported. They were never used, but they were freed only at the next request's start (part_at.clear() with the RESUME line), after that request's park, so their host RAM counted against the park's RAM floor. They are now cleared when the prompt pass ends, before prompt_ms. A pass that finished has reported every chunk, so nothing usable is dropped; the next request's own clear stays. Test: the #6011 runs on l620 (job l620-20261116-1822-5ffc, the same build): a cancel during a split's read, the short request after it and the full re-read with equal tokens; the CUDA BASE-05 identity of this build: 9 / 9 prompts identical to the recorded 0.1.60 baseline (l620-20261116-1826-0d40).
This commit is contained in:
1 parent
dd1ddc6eab
commit
b683a5f033
1 file changed
+8
@@ -19723,6 +19723,14 @@ int main(int argc, char** argv) {
|
||||
if (il_parts > 0)
|
||||
std::fprintf(stderr, "strata batch: the prompt was read in %lld parts, the slots decoding %.0f ms between "
|
||||
"them\n", (long long) il_parts + 1, il_ms);
|
||||
if (multi_gpu) {
|
||||
// #6011: the prompt pass is over. A layer split's checkpoint parts that no complete set used are stale: a
|
||||
// cancelled read leaves the first stages' parts past the last chunk the last stage reported (a finished pass
|
||||
// has reported every chunk, so nothing usable is dropped). They go now, not at the next request's start -
|
||||
// its park, before that, would count their host RAM against the RAM floor.
|
||||
std::lock_guard<std::mutex> lk(part_mu);
|
||||
part_at.clear();
|
||||
}
|
||||
const double prompt_ms = std::chrono::duration<double, std::milli>(Clock::now() - r0).count();
|
||||
const double read_pass_ms = std::chrono::duration<double, std::milli>(Clock::now() - read_t0).count();
|
||||
std::printf("REUSED %lld\n", (long long) resume); // the prompt is read; the first window comes next
|
||||
|
||||
Reference in new issue
Block a user