Course Outline
Foundations of GPU-Accelerated Computing
- Concepts of heterogeneous computing and CPU-GPU architecture
- CUDA execution models and memory spaces
- Compiling CUDA C++ using nvcc and CMake
- Validating the GPU development environment
Leveraging Parallel Algorithms with Thrust and CUB
- Implementing GPU-accelerated sort, reduce, and transform operations
- Refactoring STL algorithms for GPU execution
- Utilizing Thrust device vectors and execution policies
- Employing CUB device-wide primitives for custom pipelines
GPU Memory Architecture and Management
- Understanding Global, constant, and texture memory types
- Managing explicit device memory allocation and transfers
- Using Unified Memory to simplify data access
- Optimizing memory coalescing and access patterns
Asynchronous Execution via CUDA Streams
- Creating and managing CUDA streams
- Overlapping kernel execution with data transfers
- Using CUDA events for dependency management
- Tuning stream priorities and concurrency
Developing Custom CUDA Kernels
- The SIMT programming model and warp execution
- Configuring kernel launches and implementing grid-stride loops
- Thread indexing and multidimensional grid structures
- Error handling and CUDA runtime API checks
Thread Hierarchy and Execution Model
- Structure of grids, blocks, and threads in device code
- Warp-level primitives and ballot operations
- Block-level synchronization and barrier mechanisms
- Analyzing occupancy and resource utilization
Cooperative Groups for Flexible Parallelism
- Exploring the cooperative_groups API and group types
- Implementing thread-block tiles and tiled_partition
- Grid-level cooperative launches
- Patterns for multi-grid synchronization
Shared Memory Optimization Techniques
- Managing shared memory banks and avoiding bank conflicts
- Tiling strategies for matrix operations
- Utilizing shared memory as a user-managed cache
- Using cuda::shared_memory_mdspan for multidimensional views
Kernel Fusion and Advanced Parallel Patterns
- Fusing multiple kernels to minimize launch overhead
- Implementing scan, reduce-by-key, and segmented algorithms
- Using atomic operations and lock-free data structures
- Leveraging warp-aggregated atomics for improved throughput
Profiling and Optimization with Nsight Systems
- Timeline analysis of CPU and GPU activity
- Identifying memory transfer bottlenecks
- Profiling kernel performance and occupancy
- Iterative optimization using Nsight Compute
Modern C++ Features in CUDA Device Code
- Applying lambdas, constexpr, and auto within kernels
- Using C++17 parallel algorithms and execution policies
- Leveraging C++20 concepts and ranges on the device
- Supporting C++23 in nvcc and CCCL 3.x
CUDA Graphs and Advanced Asynchrony
- Defining and launching CUDA graphs
- Capturing graphs from stream execution
- Updating graphs and handling conditional execution nodes
- Reducing launch latency for iterative workloads
Integration Patterns for Existing Applications
- Encapsulating GPU code behind C++ interfaces
- Managing multi-GPU and NUMA systems
- Integrating build systems with CMake and CUDA
- Debugging device code using cuda-gdb
Summary and Best Practices
- Strategies for choosing between Thrust, CUB, and custom kernels
- Achieving performance portability across GPU architectures
- Code organization and RAII practices for CUDA resources
- Pathways for advanced CUDA learning and next steps
Requirements
- Solid C++ proficiency, including mastery of lambda expressions, templates, and the STL
- Working knowledge of standard algorithms, containers, and iterators
- Confidence with fundamental constructs such as loops, conditionals, and functions
- No prior experience with CUDA or GPU programming is necessary
Target Audience
- C++ developers looking to accelerate compute-intensive applications using GPUs
- Software engineers expanding their expertise from CPU-only to heterogeneous parallel programming
- Performance engineers and quantitative developers handling large-scale datasets
Testimonials (3)
Initially, the trainer's pace seemed a bit too fast for me, but after offering the feedback during the training, he acknowledged it and slowed down the pace without sacrificing any of the lectures. Good rapport with the audience, very friendly and open for discussions.
Alexandru Ostafi - Siemens
Course - Advanced C++ : Practical workshop
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.