I'm new to pyopencl as well as to OpenCL in general. Not surprisingly, I
got to a point where I'm stuck.
Here's my setup:
Hardware: To start learning and play around with GPU computing I bought
a cheap Nvidia 8400GS card for a PCI (non-Express!) slot and put it in
an oldish computer (Pentium M - based, laptop CPU on a desktop board).
The computer also has an old AGP graphics card, but no display attached
right now to that one, only to the Nvidia PCI card. The 840GS has 256MB.
Software: OS is Ubuntu 9.10. I managed to build and install pyopencl ok
with the usual amount of fiddling. (import pyopencl works, as does
running the example file dump-properties.py) First I used 0.91.4, then
today the git version, hoping that the error would go away (but it didn't).
The error: Whenever I run any of the example files, I get:
Traceback (most recent call last):
File "examples/demo.py", line 8, in <module>
ctx = cl.create_some_context()
line 275, in create_some_context
pyopencl.RuntimeError: Context failed: out of resources
As I said, this is where I'm stuck. Any ideas?
And while I'm at it, another question: Does pyopencl have something like
the gpuarray thing that I read about in pycuda?
Thanks for your help,
I'm pretty new to opencl so this might be quite obvious. :)
How do I pass a two dimensional array to a kernel, process it there and read it back?
Most examples have 1D arrays and those with 2D (like matrix-multiply) do a lot of fancy stuff which I do not (yet) understand.
To keep it simple, the processing would be just to add 1 to each element.
thanks for your help
I was just playing with the profiler from nvidia and I'm wondering why
all data from the graphic card are read back. I though memory was read
back only when using cl.enqueue_read_buffer. Here is the result I get
from the profiling of matrix-multiply.py :
method memory transfert size
As there is only one cl.enqueue_read_buffer call, there should be only
one memcpyDtoHasync call.