Using CUDA is great way to accelerate tasks on the GPU. Regular CUDA programming compiles your C++ code into code that can execute on the GPU. But what if your problem domain is more dynamic and requires generation of code on the fly?
On the CPU you can use techniques like LLVM to compile code Just-in-Time (JIT) into the native CPU instruction set and call this code directly from your application. What about on the GPU?
The NVRTC (Runtime Compilation) library accepts CUDA C++ source code and creates modules of GPU ready code that you can execute on the GPU.
This month, Richard Thomson will give us an introduction to using the NVRTC library for runtime compilation and nvJitLink for runtime linking of CUDA C++ source code to execute code on the GPU. We'll use a simple fractal generator as the example, with a user provided "iteration formula" to generate a fractal image in the complex plane.
Some of the topics to be covered are:
using NVRTC to compile source code into PTX
using nvJitLink to link the generated PTX with other application code
launching the linked code on the GPU
nvrtc: https://docs.nvidia.com/cuda/nvrtc/in...
nvJitLink: https://docs.nvidia.com/cuda/nvjitlin...
Meetup group: https://www.meetup.com/utah-cpp-progr...
Past topics: https://utahcpp.wordpress.com/past-me...
Future topics: https://utahcpp.wordpress.com/future-...