I am new to PyCUDA. Since I work on a cluster and need to specify
the gpu(s) that I use I wrote the following pycuda_device.py:
import pycuda.driver as drv
import pycuda
print("PyCUDA version:", pycuda.VERSION_TEXT)
drv.init()
numGpus = drv.Device.count()
for gpuIndex in range(numGpus):
dev = drv.Device(gpuIndex)
print("Passed in gpu index:", gpuIndex,
"PCI_DEVICE_ID:",
dev.get_attribute(pycuda._driver.device_attribute.PCI_DEVICE_ID),
"PCI_BUS_ID:",
dev.get_attribute(pycuda._driver.device_attribute.PCI_BUS_ID))
I get this result:
> python pycuda_device.py
('PyCUDA version:', '2013.1.1')
('Passed in gpu index:', 0, 'PCI_DEVICE_ID:', 0,
'PCI_BUS_ID:', 2)
('Passed in gpu index:', 1, 'PCI_DEVICE_ID:', 0,
'PCI_BUS_ID:', 3)
My question is: why is the PCI_DEVICE_ID 0 both
times?
Thanks,
Peter Andrews
|
_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda