Dynamic CUDA with NVIDIA's Runtime Compilation
Details
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
This will be an online meeting, so drinks and snacks are on you!
Join the meeting here: https://meet.xmission.com/Utah-Cpp-Programmers
Watch previous topics on the Utah C++ Programmers YouTube channel:
https://www.youtube.com/@UtahCppProgrammers
Future topics: https://utahcpp.wordpress.com/future-meeting-topics/
Past topics: https://utahcpp.wordpress.com/past-meeting-topics/
