~/talk

“CUDA Kernels with C++”

Talkat CppCon 2018 · 2018-09-23..09-28· [creative-coding]
links:none on file
slides:none on file

Shows concrete C++ applied to CUDA: template kernels replace duplicated int/float kernels, and type-safe DevicePtr vs raw pointers prevents host/device pointer mixups; constructs objects on the GPU with placement new via a one-thread AllocateObject kernel and a DevObject wrapper; overlaps transfers and compute with cudaMemcpyAsync with pinned host memory (copy/compute pipelining), while ZeroCopy spikes latency (example jumping ~2 ms to ~70 ms) and Unified Memory uses cudaMallocManaged plus prefetch advice; NVRTC enables runtime template instantiation; Compiler Explorer and cuobjdump confirm many C++ abstractions compile away to zero overhead.

AI-written summary · about

  1. 0:00Introduction to CUDA
  2. 1:08Vector addition example
  3. 4:02C++ features in CUDA
  4. 6:13Device pointers in CUDA
  5. 8:50Device memory helpers
  6. 11:48Type safety in device pointers
  7. 12:34Static polymorphism with templates
  8. 13:42Dynamic polymorphism challenges
  9. 15:57Device object allocation
  10. 18:50Dynamic object destruction
  11. 19:11New and delete in kernels
  12. 19:32Memory transfer optimization
  13. 21:01Overlapping copy and compute
  14. 22:09Pinned and zero copy memory
  15. 23:57Unified memory overview
  16. 26:30Sparse access use cases
  17. 26:53Lambda expressions in CUDA
  18. 27:58Passing lambdas to GPU
  19. 29:47Struct-based lambda creation
  20. 30:51Returning lambdas to GPU
  21. 32:39Zero-overhead abstractions
  22. 33:03Profiling CUDA code
  23. 34:53Other C++ features in CUDA
  24. 35:59Pragma unroll in CUDA
  25. 37:05Runtime compilation benefits
  26. 38:55Runtime compilation steps
  27. 42:14Thrust library overview
  28. 43:17Resources and references
  29. 44:24Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.