Course Outline
Foundations of GPU-Accelerated Computing
- Heterogeneous computing concepts and CPU-GPU architectural differences
- Understanding CUDA execution flows and memory hierarchies
- Building CUDA C++ projects using nvcc and CMake
- Validating the GPU development setup
Leveraging Parallel Algorithms with Thrust and CUB
- GPU-accelerated sorting, reduction, and transformation operations
- Adapting STL algorithms for GPU execution
- Utilizing Thrust device vectors and execution policies
- Applying CUB device-wide primitives for custom processing pipelines
GPU Memory Architecture and Control
- Distinct memory types: global, constant, and texture
- Manual device memory allocation and data transfer management
- Simplifying data access through Unified Memory
- Optimizing memory coalescing and access patterns
Asynchronous Workflows with CUDA Streams
- Establishing and overseeing CUDA streams
- Synchronizing kernel execution with data transfers
- Managing dependencies via CUDA events
- Tuning stream priorities and concurrency levels
Developing Custom CUDA Kernels
- The SIMT model and warp-based execution logic
- Configuring kernel launches and implementing grid-stride loops
- Thread indexing techniques and multidimensional grid design
- Robust error handling and CUDA runtime API validation
Thread Hierarchy and Execution Logic
- Managing grids, blocks, and threads in device code
- Using warp-level primitives and ballot functions
- Implementing block-level synchronization and barriers
- Analyzing occupancy and resource utilization
Flexible Parallelism with Cooperative Groups
- Exploring the cooperative_groups API and group structures
- Utilizing thread-block tiles and tiled_partition methods
- Performing grid-level cooperative launches
- Handling multi-grid synchronization scenarios
Shared Memory Optimization Strategies
- Managing shared memory banks and preventing conflicts
- Applying tiling techniques for matrix calculations
- Using shared memory as a manually managed cache
- Implementing cuda::shared_memory_mdspan for multidimensional views
Kernel Fusion and Advanced Parallel Structures
- Combining multiple kernels to minimize launch overhead
- Implementing scan, reduce-by-key, and segmented algorithms
- Utilizing atomic operations and lock-free data structures
- Enhancing throughput with warp-aggregated atomics
Performance Analysis with Nsight Systems
- Visualizing CPU and GPU activity timelines
- Detecting memory transfer inefficiencies
- Profiling kernel speed and occupancy
- Iterating on performance using Nsight Compute
Modern C++ Capabilities in CUDA Device Code
- Incorporating lambdas, constexpr, and auto within kernels
- Applying C++17 parallel algorithms and execution policies
- Using C++20 concepts and ranges on the device
- Leveraging C++23 support in nvcc and CCCL 3.x
CUDA Graphs and Advanced Asynchrony
- Defining and launching CUDA graphs
- Capturing graphs from stream execution
- Updating graphs and managing conditional execution nodes
- Minimizing launch latency in repetitive workloads
Integration Strategies for Existing Applications
- Encapsulating GPU code within standard C++ interfaces
- Managing multi-GPU and NUMA system configurations
- Integrating CUDA into build systems with CMake
- Debugging device code using cuda-gdb
Conclusion and Best Practices
- Selecting between Thrust, CUB, and custom kernel approaches
- Achieving performance portability across different GPU architectures
- Organizing code and applying RAII for CUDA resources
- Exploring next steps and advanced CUDA learning paths
Requirements
- Solid grasp of C++ fundamentals, including lambda expressions, templates, and the STL
- Understanding of standard algorithms, containers, and iterator patterns
- Proficiency in control flow structures such as loops, conditionals, and functions
- No previous experience with CUDA or GPU programming is necessary
Target Audience
- C++ engineers looking to accelerate compute-heavy applications via GPUs
- Software developers moving from CPU-centric to heterogeneous parallel programming
- Performance specialists and quantitative developers handling large-scale datasets
Testimonials (3)
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
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.