1 import pycuda.driver as drv
   2 
   3 
   4 
   5 drv.init()
   6 print "%d device(s) found." % drv.Device.count()
   7 
   8 for ordinal in range(drv.Device.count()):
   9     dev = drv.Device(ordinal)
  10     print "Device #%d: %s" % (ordinal, dev.name())
  11     print "  Compute Capability: %d.%d" % dev.compute_capability()
  12     print "  Total Memory: %s KB" % (dev.total_memory()//(1024))
  13     atts = [(str(att), value) 
  14             for att, value in dev.get_attributes().iteritems()]
  15     atts.sort()
  16     
  17     for att, value in atts:
  18         print "  %s: %s" % (att, value)

PyCuda/Examples/DumpProperties (last edited 2010-01-31 16:30:35 by ip72-221-120-106)