pyopencl
pyopencl copied to clipboard
problem with enqueue_fill_image
I'm pretty sure I'm using enqueue_fill_image according to the spec:
import pyopencl as cl
#...
output = cl.Image(mgr.context, cl.mem_flags.READ_WRITE, cl.ImageFormat(cl.channel_order.RGBA,cl.channel_type.UNSIGNED_INT32),
shape = (mgr.cell_width, mgr.cell_height*2))
fill_evt = cl.enqueue_fill_image(mgr.queue,output,np.zeros((4,),dtype=np.uint32),origin=(0,0),region=output.shape)
I'm getting an error that clearly indicates there is something different in the expected arguments list:
ArgumentError: Python argument types in
pyopencl._cl.enqueue_fill_image(CommandQueue, Image, numpy.ndarray)
did not match C++ signature:
enqueue_fill_image(pyopencl::command_queue {lvalue}, pyopencl::image {lvalue}, pyopenclboost::python::api::object, pyopenclboost::python::api::object queue, pyopenclboost::python::api::object mem, unsigned long color, unsigned long origin, pyopenclboost::python::api::object region, bool wait_for=None)
It seems like either the reference is outdated, in which case I want to know how to actually use this function, or something in the code is incorrect. Could you look into this?
-Thanks
I'm not sure of this, but this may be connected to the fact that I was running it on an Nvidia card (with only 1.1 OpenCL support). Still baffled at the "argument mismatch", but I understand it's not supposed to work. I've implemented a simple fillImage kernel instead.
Hey guys,
I'm having this exact same problem on an AMD GPU with OpenCL 1.2 support. I'm using pyopencl 2013.2, which is the one available via the LTS Ubuntu repo.
Do you know what could the problem be?
Thanks.
That part of PyOpenCL has essentially been rewritten in 2015.2 / git master. Could you try that to see if it's still an issue? If you've got the CL headers installed, then building PyOpenCL should not involve many hoops.
@adrian-marques, it isn't a priority for me to address this right now, are you able to do this?
Hey guys, thanks for your quick reply. I have a couple of end-of-year deadlines I'm working on, so I programmed a quick fill image kernel and moved on. I'm still interested in this though, and I'll have to set up PyOpenCL on Debian as well. When I do so, I'll try it with the newer version and let you know how it goes.
Thanks.