PyCUDA 0.93, CUDA 2.3a on Mac OS X 10.5.8

Hi everyone,

i’ve been trying to get PyCuda working with CUDA 2.3a on my Mac OS X 10.5.8. So far so good until i hit into a snag which i suspect is related to CU_DEVICE_ATTRIBUTE_CLOCK_RATE

The issue stems from the verification program of PyCuda a.k.a “test_driver.py” and part of its initialization is verifying all of the device’s attributes but when i hit into the verification of CLOCK_RATE (this name is the name used in the binding to CU_DEVICE_ATTRIBUTE_CLOCK_RATE on CUDA 2.3a) the program exits and when i removed this name from the verification process the verification succeeded.

The output from the pycuda verification process is this when i hit into CLOCK_RATE:
[indent]Traceback (most recent call last):
File “test_driver.py”, line 15, in
gen = pycuda.autoinit.device.get_attributes()
File “/Library/Python/2.5/site-packages/pycuda-0.93-py2.5-macosx-10.5-i386.egg/pycuda/driver.py”, line 50, in device_get_attributes
print getattr(device_attribute,i), dev.get_attribute(getattr(device_attribute, i))
pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
[/indent]
after removing the CLOCK_RATE from the pycuda package on my Mac OS via changing the file “driver.py” at /Library/Python/2.5/site-packages/pycuda-0.93-py2.5-macosx-10.5-i386.egg/pycuda, it became like this
[indent] 46 def _add_functionality():
47 def device_get_attributes(dev):
48 del device_attribute.CLOCK_RATE
[/indent] and re-running the verification of PyCuda succeeded.

Next, i went to explore the SDK sample program “deviceQueryDrv” (i chose this because it verified the CU_DEVICE_ATTRIBUTE_CLOCK_RATE) it ran fine.

I’m kinda wondering if anyone has experienced this issue previously and know what’s the problem?

Thanks in advance,
Ray

After investigations, turns out that my test machine which is a Mac OS X with 2 graphics cards onboard (GeForce 9400m and GeForce 9600m GT) and the problem occurred when i used

“GeForce 9400m” it failed but when i switched over to “GeForce 9600m GT” it worked fine.

Turns out that 9400m is probably not supported. Can anyone from NVIDIA confirm this?

I’m guessing this is a macbook pro right? if so the 9400 is on a PCI bus whereas the 9600 is on a PCIe bus, this could be the issue (just guessing here). How did you switch between the two?

The switching over is subtle but simple. So what you do is to access the energy saver on the mac book pro and switch it to high performance (the system will prompt you to log off); once you log back on use the deviceQueryDrv or deviceQuery in the samples given; you will see that the difference