Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cuda #memory #pytorch
ADD COMMENT
Topic
Name
6+1 =