Skip to main content

run_threaded

Function run_threaded 

Source
fn run_threaded<R>(f: impl FnOnce() -> R) -> R
Expand description

Run one inference with tract’s matrix kernels spread over a thread pool when the parallel feature is on (see tract_executor). Calls made from inside a rayon worker — the tiled drivers, which already run one tile per thread — stay on the calling thread.