Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cuda memory in pytorch

from pynvml import *
nvmlInit()
h = nvmlDeviceGetHandleByIndex(0)
info = nvmlDeviceGetMemoryInfo(h)
print(f'total    : {info.total}')
print(f'free     : {info.free}')
print(f'used     : {info.used}')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cuda #memory #pytorch
ADD COMMENT
Topic
Name
7+6 =