Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with enqueue_fill_image #32

Open
Algomorph opened this issue Apr 22, 2014 · 5 comments
Open

problem with enqueue_fill_image #32

Algomorph opened this issue Apr 22, 2014 · 5 comments

Comments

@Algomorph
Copy link

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

@Algomorph
Copy link
Author

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.

@adrian-marques
Copy link

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.

@inducer
Copy link
Owner

inducer commented Dec 10, 2015

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.

@Algomorph Algomorph reopened this Dec 10, 2015
@Algomorph
Copy link
Author

@adrian-marques, it isn't a priority for me to address this right now, are you able to do this?

@adrian-marques
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants