Contents Menu Expand Light mode Dark mode Auto light/dark mode
DeLU
Logo
  • v0.0.13 ▼

NOTES

  • Learn

API REFERENCE

  • delu
  • delu.data
  • delu.hardware
  • delu.nn
  • delu.random
Back to top
Edit this page

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

Next
delu.hardware.get_gpus_info
Previous
delu.hardware
Copyright © 2022, Yura52
Made with Sphinx and @pradyunsg's Furo