template kernel function


I found out that if you use template kernel function, the output function in ptx file will be added with some extra prefix and suffix
Like this:

template<typename T> __global__ void Foo(){};
extern "C" template __global__ void Foo<int>();

// In my_module.ptx
// .globl	_Z3FooIiEvv
.visible .entry _Z3FooIiEvv(



This makes it hard to load customized functions, isnt it?