|
AQIT 0.1.0
|
Functions | |
| tuple[float, float]|None | accelerator_vram_gib () |
| tuple[float, float]|None | cuda_vram_gib () |
| None | log_accelerator_vram (Callable[[str], None]|None log=None) |
| None | log_cuda_vram (Callable[[str], None]|None log=None) |
| None | release_inspection_models () |
| None | cleanup_heavy_job_vram () |
| None | restore_session_model (str|None model_id) |
| str | oom_message (*, str job, str model_id) |
| str | cuda_oom_message (*, str job, str model_id) |
| None | raise_if_cuda_oom (BaseException exc, *, str job, str model_id) |
| str | backend_summary () |
| tuple[float, float] | None accelerator_vram_gib | ( | ) |
Free/total GiB for the active accelerator (CUDA/ROCm only; MPS has no public API).
Definition at line 21 of file vram_guard.py.
Referenced by cuda_vram_gib(), log_accelerator_vram(), and oom_message().
| str backend_summary | ( | ) |
Definition at line 114 of file vram_guard.py.
| None cleanup_heavy_job_vram | ( | ) |
Drop any models loaded during a heavy job (simulate TL cache, HF weights).
Definition at line 66 of file vram_guard.py.
References release_inspection_models().
| str cuda_oom_message | ( | * | , |
| str | job, | ||
| str | model_id ) |
Definition at line 104 of file vram_guard.py.
References oom_message().
| tuple[float, float] | None cuda_vram_gib | ( | ) |
Backward-compatible alias.
Definition at line 31 of file vram_guard.py.
References accelerator_vram_gib().
| None log_accelerator_vram | ( | Callable[[str], None] | None | log = None | ) |
Definition at line 36 of file vram_guard.py.
References accelerator_vram_gib().
Referenced by log_cuda_vram().
| None log_cuda_vram | ( | Callable[[str], None] | None | log = None | ) |
Definition at line 53 of file vram_guard.py.
References log_accelerator_vram().
| str oom_message | ( | * | , |
| str | job, | ||
| str | model_id ) |
Definition at line 87 of file vram_guard.py.
References accelerator_vram_gib().
Referenced by cuda_oom_message(), and raise_if_cuda_oom().
| None raise_if_cuda_oom | ( | BaseException | exc, |
| * | , | ||
| str | job, | ||
| str | model_id ) |
Definition at line 108 of file vram_guard.py.
References oom_message().
| None release_inspection_models | ( | ) |
Unload HookedTransformer / embedding caches so simulate can own the GPU.
Definition at line 57 of file vram_guard.py.
Referenced by cleanup_heavy_job_vram().
| None restore_session_model | ( | str | None | model_id | ) |
Definition at line 71 of file vram_guard.py.