def get_cuda_memory():
 if (not _cuda_capable):
  warn('CUDA not enabled, returning zero for memory')
  mem = 0
 else:
  from pycuda.driver import mem_get_info
  mem = mem_get_info()[0]
 return sizeof_fmt(mem)

def get_cuda_memory ( ) : if ( not _cuda_capable ) : warn ( 'CUDA not enabled, returning zero for memory' ) mem = 0 else : from pycuda . driver import mem_get_info mem = mem_get_info ( ) [ 0 ] return sizeof_fmt ( mem )
get the amount of free memory for cuda operations .