Skip to content
DeLU 0.0.10 documentation logo
DeLU 0.0.10 delu.hardware.free_memory
Type to start searching
    DeLU
    • delu.hardware
    DeLU
    • NOTES
    • Learn
    • API REFERENCE
    • delu
    • delu.data
    • delu.hardware
    • delu.nn
    • delu.random
    • Show Source

    delu.hardware.free_memory¶

    delu.hardware.free_memory()[source]¶

    Free GPU-memory occupied by torch and run the garbage collector.

    Warning

    There is a small chunk of GPU-memory (occupied by drivers) that is impossible to free. It is a torch “limitation”, so the function inherits this property.

    Inspired by: https://github.com/xtinkt/editable/blob/1c80efb80c196cdb925fc994fc9ed576a246c7a1/lib/utils/basic.py#L124

    Return type

    None

    © Copyright 2022, Yura52.
    Created using Sphinx 4.2.0. and Material for Sphinx