Skip to main content

wait_for_vram

Function wait_for_vram 

Source
pub fn wait_for_vram(
    ledger: &mut VramLedger,
    budget_mb: usize,
    task: &str,
    config: &WaitConfig,
    profiler: &mut GpuProfiler,
) -> Result<u64, GpuError>
Expand description

Poll the ledger until VRAM budget is available.

Returns Ok(()) when reservation is acquired, or Err(Timeout) when timeout is exceeded.