Skip to main content

ensure_model_ready_sync

Function ensure_model_ready_sync 

Source
pub fn ensure_model_ready_sync(
    worker: &GpuWorker,
    model_name: &str,
    config: &Config,
    hint: Option<ActivationHint>,
    request_has_lora: bool,
) -> Result<()>
Expand description

Ensure a model is loaded on this worker’s GPU.

Holds worker.model_load_lock implicitly via the caller for generation jobs; the admin API path acquires it explicitly via load_blocking.

hint carries the per-request activation budget (resolution + family). Pass None for admin / cache-prewarm loads with no resolution context.