Bringing Existing Code to CUDA Using constexpr and std::pmr - Bowie Owens - CppCon 2021

Описание к видео Bringing Existing Code to CUDA Using constexpr and std::pmr - Bowie Owens - CppCon 2021

https://cppcon.org/
https://github.com/CppCon/CppCon2021
---
The options pricing library I work on at CSIRO is both computationally intensive and highly mathematical – a perfect fit for improving performance by moving calculations to the GPU. In this talk I will discuss my experience adjusting our existing code to use CUDA and some lessons learned along the way.

Adjusting existing code to use CUDA is not yet as simple as recompiling with the Nvidia compiler. There are two primary constraints that working with the GPU imposes. First, the GPU cannot access just any memory address. Second, the GPU cannot execute just any function in your program. These constraints can make it difficult to use code that was not designed with the GPU in mind with CUDA.

In this talk I will first address the constraints on memory layout that working with the GPU imposes. I will then show how I adjusted data-structures and used std::pmr to place data within GPU accessible memory. Next, I will discuss the constraints created by only being able to call on the GPU functions annotated with _device__. I will then show how the CUDA feature for treating constexpr functions as __device_ functions makes it easier to get code running on the GPU and debugging it once it is there. Lastly, I will compare the performance of calculations done on the CPU vs CUDA.

If you are considering porting existing code to CUDA, by the end of the talk you should have a better idea of the impediments to running that code on the GPU and high level details of the strategy I used to overcome those impediments.

---
Bowie Owens

Bowie Owens is a software developer working at Data61, a part of the Australian government funded research organisation CSIRO. The team he works in develops complex mathematical models for pricing financial options. The software developed at Data61 is integrated into a larger trading and risk management system that is used by hundreds of financial institutions around the world.

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

*--*

Комментарии

Информация по комментариям в разработке