Attending this event?
View analytic
Thursday, September 27 • 09:00 - 10:00
Using Template Magic to Automatically Generate Hybrid CPU/GPU-Code

Sign up or log in to save this to your schedule and see who's attending!

In this talk you’ll learn how you can write code that will either compile into a CPU based loop or into a special kind of function called “kernel" to be executed on a GPU. You’ll get an introduction into the memory- and threading-models of recent GPUs and are provided with examples for (mostly) simple helper templates to manage them. You can test and debug your code on CPU and scale out later. In the end, you’ll be able to parallelise operations on vectors without having to think much about the architecture. Template magic will take of that for you.
Note: there are several ways to leverage the compute power of GPUs for your applications. There are pragma-based approaches like OpenACC or recent versions of OpenMP. Or you can take more control and use approaches like Nvidia’s CUDA, AMD’s similar HIP or the latest versions of OpenCL. All of the latter are based on subsets of the C++-14 standard with extensions to manage the execution of code (at least) on GPUs. This session will cover a CUDA-C++ based approach, but the techniques shown should be applicable to other models as well.


Elmar Westphal

Scientific Programmer, Forschungszentrum Juelich

Thursday September 27, 2018 09:00 - 10:00

Attendees (25)