Making Friends With Cuda Programmers (Please constexpr all the things)

This post goes into slightly more detail on the content I presented as a lightning talk at CppCon 2023. You can find some links to the various resources below:

  • Google Drive version of the presentation here
  • Google Drive version of the charts (plus raw data) here
  • GitHub repo with scripts I used to generate the charts (and README going into more detail on correctness)
  • Video link to come at some point in the future

Application Form Submission

Here’s what I wrote in the application form:

Title: Making friends with CUDA programmers (please constexpr all the things)

Abstract: The --expt-relaxed-constexpr flag in nvcc allows constexpr code to be used on device, removing the need for explicit device annotations. I’ll encourage library authors to annotate more code as constexpr, allowing CUDA C++ programmers to use the library directly (rather than writing their own), saving work and thus making friends.

Short Bio: Vasu is a research engineer working at the intersection of graphics, machine learning, computer vision, and virtual reality (aka “the Metaverse”), focusing on high-performance, low-latency applications. In his free time, he enjoys watching movies & sci-fi TV shows, learning to play guitar (poorly), and practicing Tae Kwon Do.

Keywords (500 chars or less, comma separated):

GPU, CUDA, C++, CUDA C++, constexpr, __device__, --expt-relaxed-constexpr, expt relaxed constexpr, relaxed constexpr, nvcc, Nvidia, constexpr in CUDA, library, CUDA library, third party library, library in CUDA, third party library in CUDA, GPU library, CPU code on GPU, converting code to GPU, GPU development, CUDA annotation, __device__ annotation, __host__, host code, __device__ __host__, __NVCC__, constexpr benefits, device-side code, GPU code simplification, GPU code reuse, best practices

ChatGPT turned out to generate a few decent ideas that I stole for this list as well, after I ran out.

Misc Thoughts

  • We used a Logitech Spotlight to present, which has the ability to add the red dot on the screen, emulating a laser pointer. Turns out it’s just using an accelerometer inside (probably).
  • I didn’t see the timer on the iPad sitting in the front row until about 13 seconds left in the presentation when the person holding it started waving it around. That probably explains why my pacing was a little off. Oops.
  • I’d definitely recommend others give lightning talks as well - you can fit a surprisingly large amount of content in 5 mins, but the time is short enough that you’re forced to focus on the most important elements.