Answers for "cuda memory in pytorch"

0

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}')
Posted by: Guest on September-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language