Hi, I am looking at the PyCUDA example for C++ templated kernel calls
[1], but I have the __global__ kernel function with a template, i.e.,

template <class T> __global__ void cuda_kernel(...)

>From C++, this is invoked via, e.g.,

cuda_kernel<float><<< grid, threads >>>(...)

I admit that the theory and PyCUDA practice of name mangling is fuzzy in
my head, so you'll forgive me if I am doing something laughable, but I
tried, in Python,

module = SourceModule(custring, no_extern_c=1)
cuda_kernel  = module.get_function("cuda_kernel")

where "custring" contains the CUDA kernel code, and PyCUDA spits out an
error,

LogicError: cuModuleGetFunction failed: not found

How can I get my host-callable C++-template kernel functions into
PyCUDA, aside from the simple-minded workaround of untemplating
everything?

Many thanks,
Ahmed

[1] http://wiki.tiker.net/PyCuda/Examples/C%2B%2BFunctionTemplates

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to