Thank you for your quick reply.

The reason I looked at the PCI_DEVICE_ID is because I wanted to confirm that the device I was using was actually the device I specified with:

dev = drv.Device(gpuIndex)

Is there a different attribute that would return the value I passed into drv.Device()?

I understand that this is not really an attribute of the device but more the driver but I do not see any methods there that seem appropriate.

This is not a huge deal -- I actually trust that things are working as expected but I am curious.

Thanks,

Peter



On 1/13/2014 1:38 PM, Stanley Seibert wrote:
I believe the device ID is an identifier unique only to the particular bus the device is attached to, rather than a globally unique ID for the entire system.  Since PCI Express is a point-to-point "bus," I would not be surprised if all devices have ID 0.

I would use the device ID and bus ID as a tuple to uniquely identify devices.

On Jan 13, 2014, at 12:28 PM, Peter Andrews <peter.andr...@dartmouth.edu> wrote:

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

    

--
Peter Andrews
Programmer
Institute for Quantitative Biomedical Sciences (iQBS)
705 Rubin, HB7937
Dartmouth-Hitchcock Medical Center
One Medical Center Dr.
Lebanon, NH 03756
w) (603) 653-9963
_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to