You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test long-form pipeline panics, cancellation and memory bound on CPU #41
The long-form pipeline's panic, cancellation and memory-bound behaviour is only tested on a GPU. Every relevant test is #[ignore]d, so CI never runs them:
The bound in the run_batched_plan doc comment, "workers stay at most one batch ahead of the model", is not asserted anywhere. This is the code where review kept finding hangs: worker panic, then consumer panic, then the batched path. #9, #35 and #40 each fixed one of them.
Proposal
Let run_batched_plan and run_parallel_plan run with a fake CPU pipeline that can panic, return an error, or stall on any window index
Inject a panic, an error and a cancel at every window index, in each role:
preparing worker
model consumer
VAD scan thread
planner
Check every run:
it returns rather than hangs
it returns the injected error, not a different one
all threads are joined
a failed run does not cancel the caller's TranscriptionControl
the windows held in memory never exceed 2 * batch_size
Run Lookahead, StopOnPanic, StopRunOnPanic and ClosePlan under shuttle, or loom if the state space stays small, so lost wakeups between the Mutex/Condvar gate and the sync_channel are found by search instead of by luck
Do the same for the scheduler's StopOnExit path
Run all of it in the normal CI job
Code (master 230e027)
src/long_form/execute.rs:170-186: path choice
src/long_form/execute.rs:207-330: batched path; sync_channel(batch_size) at :228, allow at :303
src/long_form/execute.rs:333-399: parallel path and collector
src/long_form/execute.rs:450-515: Lookahead and StopOnPanic
Activity