Blair:

I am using version 2014.1 on Fedora Linux with Intel
opencl-1.2-4.5.0.8 on CPUs and
xorg-x11-drv-nvidia-cuda-355.11-1.fc21.x86_64 on Kepler GPUs.

I don't use the enqueue_nd_range_kernel() but run my own custom OpenCL
kernels in sequence on the OpenCL device by initializing input arrays
with pyopencl.array.to_device() and retrieving output arrays with
array_dev.map_to_host().

For the kernels running on those device arrays, I invoke them like:

  ctx = pyopencl.create_some_context()
  clq = pyopencl.CommandQueue(ctx)

  ...

  program = cl.Program(ctx, opencl_sourcecode).build()

  program.foo(
    cl_queue, (workshape,), None, 
    dst_dev.data, src_dev.data, 
    cl_array.vec.make_int3(*dst_dev.shape),
    numpy.uint32(other_param)
  )

where the arguments starting with "dst_dev.data" are the actual kernel
parameters accepted by my OpenCL kernel called "foo".

I hope that helps.


Karl


_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to