On Thu, 23 Feb 2012 10:23:23 +0100, Lucas Beyer <[email protected]> wrote: > Hello, > > I'm facing this exact same issue. The types of the arguments I am giving are: > > ('1st arg type: ', <class 'pyopencl.Program'>) > ('2nd arg type: ', <type 'str'>) > ('cl.Kernel type: ', <type 'Boost.Python.class'>) > > The exact error I see is the same, although a little less verbose on the > types: > > Boost.Python.ArgumentError: Python argument types in > Kernel.__init__(Kernel, Program, str) > did not match C++ signature: > __init__(_object*, pyopencl::program, std::string) > > I get this error on both a linux system with python 2.7.1 in a virtual > environment built using gcc4.6 aswell as a Mac OS X system running python > 2.7.2 in a virtual environment built using gcc4.2. > > I tried out pyopencl-2011.1 aswell as pyopencl-2011.1, both have the same > error. > > Creating the kernel using the attribute accessing way works though. If you do > know the kernel name ahead of time (which doesn't seem to be Kiri's > situation), the code looks like the following for a kernel named "trsm": > > kernel = program.trsm > > If you're in Kiri's situation and the kernel name is only known as a string > variable, you can still use this method in the following way: > > kernel_name = "trsm" > kernel = program.__getattr__(kernel_name) > > Hope this helps while we wait for a fix.
Fixed in git. Thanks for the report. Andreas
pgpwuS8IIuzho.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
