"Boonzajer Flaes, D.E." <[email protected]> writes: > I'm new to pyopencl. I'm trying to build my own kernel for a rather > simple operation on two 2d complex matrices. This works quite well, > except that the ElementwiseKernel is still roughly 10% faster. I'd > like to examine what source code for the cl kernel is generated by the > elementwise kernel, but I haven't found an easy way to do that. Is > there an easy way to access the source code generated by > pyopencl.ElementWiseKernel?
elw = ElementWiseKernel(stuff) knl, _ = elw.get_kernel(False) print knl.program.source (or a minor tweak thereof, untested) should work. This depends on whether your CL implementation supports retrieving the source. Alternatively, just hack a print statement into a judiciously chosen spot in elementwise.py. :) HTH, Andreas
signature.asc
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
