Skip to content

Instantly share code, notes, and snippets.

@purew
Last active May 17, 2016 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save purew/9b10181950a188d7ec24184a497345f5 to your computer and use it in GitHub Desktop.
Save purew/9b10181950a188d7ec24184a497345f5 to your computer and use it in GitHub Desktop.
import pycuda.compiler as comp
import pycuda.driver as drv
import pycuda.tools
import numpy
#import pycuda.autoinit
drv.init()
ctx = pycuda.tools.get_default_device()
print('Device-count: {}'.format(drv.Device.count()))
dvc = drv.Device(0)
print('Memory', dvc.total_memory() / (1024*1000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment