[PyCUDA] Invalid Context with DeviceMemoryPool & GPUArray
Bryan Catanzaro
catanzar at eecs.berkeley.edu
Wed Sep 29 17:17:25 PDT 2010
Hi All -
I recently upgraded to CUDA 3.2 RC, and pulled PyCUDA from git, on my Mac OS X installation (running a 32 bit Python 2.6).
For some reason, trying to create a GPUArray, using pycuda.tools.DeviceMemoryPool.allocate as the allocator, causes an error.
Creating the same GPUArray, using the default allocator, seems to work fine. Before upgrading CUDA and PyCUDA, creating GPUArrays with the memory pool worked for me.
I've attached a minimal program with this problem. Has anyone else seen this error?
- bryan
Traceback (most recent call last):
File "invalid_context.py", line 10, in <module>
failure = pycuda.gpuarray.GPUArray((10,), numpy.int32, allocator.allocate)
File "/Users/catanzar/work/pycuda/build/lib.macosx-10.6-i386-2.6/pycuda/gpuarray.py", line 81, in __init__
self.gpudata = self.allocator(self.size * self.dtype.itemsize)
pycuda._driver.LogicError: cuMemAlloc failed: invalid context
-------------- next part --------------
A non-text attachment was scrubbed...
Name: invalid_context.py
Type: text/x-python-script
Size: 269 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20100929/c1cb7eda/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3690 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20100929/c1cb7eda/attachment-0001.bin>
More information about the PyCUDA
mailing list