On Tue, 3 May 2011 11:20:36 -0400, Frédéric Bastien <[email protected]> wrote: > Sorry to reply to my own post, but I have a question that I can't find > the answer on the documentation site. > > Before calling some gpu function, in some case I do some good > preprocessing of the parameter for optimization. Currently this is > done in C and so this is not a bottle neck. We I move this to > pycuda.gpuarray, I can do the preprocessing in python, but I fear it > will be slow. Is there a way that the SourceModule define c function > and call them from python? It is this function that will call the gpu > function itself. > > I know I can do it in otherway, but if it can be done directly in the > same systeme it would be great.
PyCUDA makes no attempt to help you call host functions, whether those go on and call CUDA kernels or no. If your preprocessing can be parametrized in some way, we might be able to shove it into one of PyCUDA's compiled modules. If that code needs to be generated on the spot, that brings in a whole different set of issues. Can you describe what your preprocessor has to do? Andreas
pgpX9E25MJlJE.pgp
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
