On Mon, 2012-02-06 at 11:47 +0000, Daniele Pianu wrote: > Daniele Pianu <muogoro@...> writes: > > > The problem is that the code > > successfully compiles, but the enqueue_copy used for retrieving the > > result of the key scheduling always returns an empty numpy array. Some > > info about my development environment: > > > > - pyopencl compiled from git (had the same error with 2011.2 version) > > - AMD-APP-SDK-v2.5 > > - Fedora 16 > > > > The device used is a mobility radeon 4570 gpu. > > I've done some minor modifications to my code (fixed the buffer size, removed > a > cast from const to global memory in the OpenCL code). Here the new code: > > - python host: http://pastebin.com/Le7QhsGK > - opencl code: http://pastebin.com/tHdHDp0s > > Still have the same problem. > > Daniele >
Ok, I managed to solve the problem, I was passing the wrong array to the enqueue_copy function: I was using a pyopencl buffer object instead of a numpy array for creating an empty numpy array to fill with the enqueue_copy function. Now everything works. Thank you for the extraordinary work you've done with these bindings :D Daniele _______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
