Hi,

first of all: nice piece of work Andreas!

Now to my problem: I installed CUDA 2.1 on my T61 laptop computer with a Nvidia Quadro NVS 140M graphics card w/ 128MB memory. git version of PyCUDA (0.93 beta I assume) installs fine but I get some errors when I try to run tests. First test_driver:

/opt/PyCUDA/pycuda-git/test$python test_driver.py
...E....Eterminate called after throwing an instance of 'cuda::error'
  what():  cuMemFree failed: invalid context
Aborted

Or runnung gpuarray speed test:
/opt/PyCUDA/pycuda-git/test$python undistributed/test_gpuarray_speed.py
1024
2048
4096
8192
16384
32768
65536
131072
262144
524288
1048576
2097152
Traceback (most recent call last):
  File "undistributed/test_gpuarray_speed.py", line 83, in <module>
    main()
  File "undistributed/test_gpuarray_speed.py", line 27, in main
    b = gpuarray.zeros((size,), dtype=numpy.float32)
File "/usr/lib/python2.5/site-packages/pycuda-0.93beta-py2.5-linux-x86_64.egg/pycuda/gpuarray.py", line 409, in zeros
    result = GPUArray(shape, dtype, stream, allocator)
File "/usr/lib/python2.5/site-packages/pycuda-0.93beta-py2.5-linux-x86_64.egg/pycuda/gpuarray.py", line 75, in __init__
    self.gpudata = self.allocator(self.size * self.dtype.itemsize)
pycuda._driver.MemoryError: cuMemAlloc failed: out of memory
-----------------------------------------------------------
PyCUDA WARNING: I'm being asked to destroy a
context that's part of the current context stack.
-----------------------------------------------------------
I will pick the next lower active context from the
context stack. Since this choice is happening
at an unspecified point in time, your code
may be making false assumptions about which
context is active at what point.
Call Context.pop() to avoid this warning.
-----------------------------------------------------------
If Python is terminating abnormally (eg. exiting upon an
unhandled exception), you may ignore this.
-----------------------------------------------------------


test_gpuarray only threw some warnings:
python test_gpuarray.py
/usr/lib/python2.5/site-packages/pycuda-0.93beta-py2.5-linux-x86_64.egg/pycuda/gpuarray.py:498: UserWarning: behavior change: arange guessed dtype other than float32. suggest specifying explicit dtype.
  warn("behavior change: arange guessed dtype other than float32. "
..................
----------------------------------------------------------------------
Ran 18 tests in 14.756s

OK

Here are some debug information you might need:
In [61]: pycuda.autoinit.device.get_attributes()
Out[62]:
{pycuda._driver.device_attribute.MAX_THREADS_PER_BLOCK: 512,
 pycuda._driver.device_attribute.MAX_BLOCK_DIM_X: 512,
 pycuda._driver.device_attribute.MAX_BLOCK_DIM_Y: 512,
 pycuda._driver.device_attribute.MAX_BLOCK_DIM_Z: 64,
 pycuda._driver.device_attribute.MAX_GRID_DIM_X: 65535,
 pycuda._driver.device_attribute.MAX_GRID_DIM_Y: 65535,
 pycuda._driver.device_attribute.MAX_GRID_DIM_Z: 1,
 pycuda._driver.device_attribute.MAX_SHARED_MEMORY_PER_BLOCK: 16384,
 pycuda._driver.device_attribute.TOTAL_CONSTANT_MEMORY: 65536,
 pycuda._driver.device_attribute.WARP_SIZE: 32,
 pycuda._driver.device_attribute.MAX_PITCH: 262144,
 pycuda._driver.device_attribute.MAX_REGISTERS_PER_BLOCK: 8192,
 pycuda._driver.device_attribute.CLOCK_RATE: 800000,
 pycuda._driver.device_attribute.TEXTURE_ALIGNMENT: 256,
 pycuda._driver.device_attribute.GPU_OVERLAP: 1,
 pycuda._driver.device_attribute.MULTIPROCESSOR_COUNT: 2}

In [63]: pycuda.autoinit.device.compute_capability()
Out[63]: (1, 1)

In [65]: pycuda.autoinit.device.total_memory()
Out[65]: 133496832

In [66]: pycuda.autoinit.device.make_context()
terminate called after throwing an instance of 'cuda::error'
  what():  cuMemFree failed: invalid context
Aborted

All the other tests were fine, so PyCUDA works nicely.
Could you please check where the "invalid context" error comes from?
And maybe add a memory checker to your tests so we low-mem GPU user are not discriminated ;-).

Keep up the good work!

Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to