Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
15 lines
1.0 KiB
Bash
15 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
# Prefill fixed-latency program: put a job back in the queue behind a SPARSE lab holder. Started DETACHED by pf_ab_job.sh (guard: the inherited sealed memfd is not
|
|
# sparse), after the job has touched jobs/STOP and closed the holder's descriptor and exited. Waits for the holder to end, starts the sparse one (pf_holder_window.sh),
|
|
# then removes JOB.done so the new holder's queue picks the job again (its name stays in jobs/PRIORITY). pf_sparse_requeue.sh JOBNAME. Test tooling, never in serving.
|
|
set -u
|
|
JOB=${1:?job name}
|
|
PL=/data/leleka-e2e/prefill-latency
|
|
J=$HOME/work/gpu-runs/holder2/jobs
|
|
NOTES=/data/leleka-e2e/decode/notes.md
|
|
echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $JOB found a non-sparse memfd: sparse holder restart, then $JOB runs again" >> "$NOTES"
|
|
bash "$PL/tools/pf_holder_window.sh" "requeue-$JOB" sparse
|
|
for _ in $(seq 1 60); do [ -f "$J/READY" ] && break; sleep 5; done
|
|
rm -f "$J/$JOB.done"
|
|
echo "[$(date -u +%FT%TZ)] [DEV prefill-latency] $JOB queued again behind the sparse holder" >> "$NOTES"
|