Skip to content
FastVideo
Esc
↑↓navigate↵open⌘Jpreview
On this page

memory

Small GPU-memory helper used by :class:EvalWorker.

fastvideo.eval.memory.clear_cache

clear_cache() -> None

Free GPU cache + run garbage collection.

Source
def clear_cache() -> None:
    """Free GPU cache + run garbage collection."""
    gc.collect()
    if torch.cuda.is_available():
        torch.cuda.empty_cache()

Was this page helpful?