Dynamic code generation with CUDA

Hi,

I would like to know if CUDA support dynamic code generation. My application currently generate some code as a “text” buffer.
Once done I would like to generate my CUDA from this code and then execute it.

Can you tell me if it is possible ?

Thx

It is possible, but not supported at the API level. You essentially have to launch NVCC as a process, compile into a library, then dynamically load the library.

See Google Code Archive - Long-term storage for Google Code Project Hosting. for an example of a relatively mature project that does this.

PyCUDA provides exactly this sort of dynamic code generation and metaprogramming via a straightforward, pythonic interface.

Thanks