Course Outline
Fundamentals of GPU-Accelerated Computing
- Heterogeneous computing concepts and CPU-GPU architectural differences
- CUDA execution models and memory hierarchy
- Building CUDA C++ projects using nvcc and CMake
- Validating the GPU development setup
Parallel Algorithms using Thrust and CUB
- GPU-accelerated sorting, reduction, and transformation operations
- Adapting STL algorithms for GPU execution
- Utilizing Thrust device vectors and execution policies
- Employing CUB device-wide primitives for custom processing pipelines
GPU Memory Architecture and Management
- Characteristics of global, constant, and texture memory types
- Manual device memory allocation and data transfer management
- Using Unified Memory to simplify data access
- Optimizing memory coalescing and access patterns
Asynchronous Execution via CUDA Streams
- Creation and management of CUDA streams
- Concurrent execution of kernels and data transfers
- Using CUDA events to manage dependencies
- Adjusting stream priorities and concurrency for performance
Developing Custom CUDA Kernels
- The SIMT programming model and warp-based execution
- Kernel launch configurations and grid-stride loops
- Thread indexing strategies and multidimensional grid usage
- Error handling and runtime API validation in CUDA
Thread Hierarchy and Execution Models
- Structuring grids, blocks, and threads in device code
- Warp-level primitives and ballot operations
- Block-level synchronization and barrier management
- Analyzing occupancy and resource utilization
Cooperative Groups for Flexible Parallelism
- Overview of the cooperative_groups API and various group types
- Implementing thread-block tiles and tiled partitions
- Grid-level cooperative launches
- Synchronization patterns across multiple grids
Shared Memory Optimization Strategies
- Understanding shared memory banks and avoiding bank conflicts
- Tiling techniques for matrix operations
- Utilizing shared memory as a user-managed cache
- Applying cuda::shared_memory_mdspan for multidimensional views
Kernel Fusion and Advanced Parallel Patterns
- Combining multiple kernels to minimize launch overhead
- Implementing scan, reduce-by-key, and segmented algorithms
- Atomic operations and lock-free data structures
- Warp-aggregated atomics for improved throughput
Profiling and Optimization with Nsight Systems
- Timeline-based analysis of CPU and GPU activities
- Pinpointing memory transfer bottlenecks
- Profiling kernel performance and occupancy levels
- Iterative optimization using Nsight Compute
Modern C++ Features in CUDA Device Code
- Use of Lambdas, constexpr, and auto in kernel functions
- Integration of C++17 parallel algorithms and execution policies
- Applying C++20 concepts and ranges on the device
- Support for C++23 in nvcc and CCCL 3.x
CUDA Graphs and Advanced Asynchrony
- Definition and execution of CUDA graphs
- Capturing graphs from stream execution
- Updating graphs and handling conditional execution nodes
- Minimizing launch latency in iterative workloads
Integration Patterns for Existing Applications
- Encapsulating GPU code behind C++ interfaces
- Managing multi-GPU and NUMA system environments
- Integrating CUDA into build systems using CMake
- Debugging device code with cuda-gdb
Summary and Best Practices
- Criteria for selecting between Thrust, CUB, and custom kernels
- Achieving performance portability across different GPU architectures
- Organizing code and applying RAII for CUDA resources
- Pathways for further advanced CUDA learning
Requirements
- Foundational C++ proficiency, including lambda expressions, templates, and the Standard Template Library (STL)
- Understanding of standard algorithms, containers, and iterators
- Confidence with loops, conditional logic, and function structures
- No prior experience with CUDA or GPU programming is necessary
Target Audience
- C++ developers looking to speed up compute-heavy applications using GPUs
- Software engineers shifting from exclusive CPU-based development to heterogeneous parallel programming
- Performance engineers and quantitative developers managing large-scale datasets
Testimonials (4)
Detailed explanation, re-iteration of points in a quite subtle way that really drove the knowledge home very well. Rod's willingness to double-check the odd obscure question that we rasied, to be sure that his answers were 100% right. Also, his interest in discussing the pros & cons of alternate coding styles so that we learnt not only how to use C++ in our intended way, but why it should be done that way.
Nick Dillon - cellxica Ltd
Course - Using C++ in Embedded Systems - Applying C++11/C++14
Experience sharing, it's teacher's know-how and valuable.
Carey Fan - Logitech
Course - C/C++ Secure Coding
Practical examples
Jan Kaniuka - SIEC BADAWCZA LUKASIEWICZ - PRZEMYSLOWY INSTYTUT AUTOMATYKI I POMIAROW PIAP
Course - Programowanie wielowątkowe w języku C++
The online-ness of it meant that we could save a lot of time. Much appreciated. Also, the fact that the trainer knew both c# and Cpp was a huge help since he could explain everything through knowledge we already possessed.