Skip to main content

Module gpu_worker

Module gpu_worker 

Source

Functions§

ensure_model_ready_sync
Ensure a model is loaded on this worker’s GPU.
load_blocking
Synchronously load a model on this GPU worker for the admin API.
run_chain_blocking
Run a blocking chain operation on a specific GPU worker.
run_stage_blocking
Run a blocking chain-job stage operation on a specific GPU worker.
spawn_gpu_thread
Spawn the dedicated OS thread for a GPU worker. Returns the JoinHandle (caller should keep it alive).
unload_blocking
Synchronously unload the currently active model on this GPU worker.

Type Aliases§

ChainPrep
Return type for run_chain_blocking. The outer Result carries helper-prep errors (ensure_model_ready + cache take); the inner Result is whatever the caller’s closure returned. Closure errors pass through unchanged so the caller can distinguish orchestrator-specific failures (StageFailed, Invalid) from prep failures (ensure/cache).