[PyCUDA] Trying to get test_driver.py to run on OSX
Andreas Klöckner
lists at informa.tiker.net
Wed Sep 16 17:28:49 PDT 2009
Hi Aaron,
On Mittwoch 16 September 2009, Aaron Cohen wrote:
> One potential problem is that I installed the latest CUDA package,
> 2.3. Does PyCUDA work with 2.3? The documentation implies that it will.
> Should I downgrade to CUDA Driver 2.2? How do I uninstall the 2.3
> package?
I'm using 2.3 with PyCUDA, and have been for a while (on Linux). There
shouldn't be any issues.
> After suffering though the linkage problems in the CUDA sdk and the
> MacPorts boost and fixing that stuff with help from this mailing list,
> I've run into another roadblock. When I run test_driver.py I get this
> error message:
> $ python2.5 test_driver.py
> Traceback (most recent call last):
> File "test_driver.py", line 25, in <module>
> assert isinstance(pycuda.autoinit.device.get_attributes(), dict)
> File "/opt/local/lib/python2.5/site-packages/pycuda-0.94beta-py2.5-
> macosx-10.5-i386.egg/pycuda/driver.py", line 51, in
> device_get_attributes
> for att in dir(device_attribute)
> File "/opt/local/lib/python2.5/site-packages/pycuda-0.94beta-py2.5-
> macosx-10.5-i386.egg/pycuda/driver.py", line 52, in <genexpr>
> if att[0].isupper())
> pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
By this point, the code has already gotten past a few CUDA calls, so you
should generally be fine--try some of the demos, I imagine they might work.
Can you trace which attribute is being queried (just insert a print statement
somewhere along this traceback)? One reason may be that you compiled against a
CUDA header that doesn't match your installed GPU driver, in which case the
header would have told PyCUDA about device attributes that don't exist in an
older version of the driver, which would lead to this error. Or maybe there's
something else going on that we don't know about yet.
HTH,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20090916/a6ababca/attachment-0001.pgp>
More information about the PyCUDA
mailing list