Answers for "get cuda memory pytorch"

0

get cuda memory pytorch

t = torch.cuda.get_device_properties(0).total_memory
r = torch.cuda.memory_reserved(0)
a = torch.cuda.memory_allocated(0)
f = r-a  # free inside reserved
Posted by: Guest on September-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language