Course Outline
Foundations of GPU-Accelerated Computing
- The principles of heterogeneous computing and the CPU-GPU architectural relationship
- CUDA execution models and memory hierarchies
- Building CUDA C++ projects using nvcc and CMake
- Validating the GPU development environment
Implementing Parallel Algorithms with Thrust and CUB
- Accelerating sorting, reduction, and transformation operations on the GPU
- Adapting STL algorithms for efficient GPU execution
- Utilizing Thrust device vectors and specifying execution policies
- Leveraging CUB device-wide primitives for building custom pipelines
GPU Memory Architecture and Management
- Understanding global, constant, and texture memory types
- Performing explicit device memory allocation and data transfers
- Simplifying data access through Unified Memory
- Optimizing memory coalescing and data access patterns
Managing Asynchronous Execution with CUDA Streams
- Creating and controlling CUDA streams
- Synchronizing kernel execution with data transfers to maximize overlap
- Using CUDA events for managing task dependencies
- Tuning stream priorities for optimal concurrency
Developing Custom CUDA Kernels
- Understanding the SIMT programming model and warp-level execution
- Configuring kernel launches and utilizing grid-stride loops
- Managing thread indexing within multidimensional grids
- Implementing robust error handling and CUDA runtime API checks
Thread Hierarchy and the Execution Model
- Structuring grids, blocks, and threads in device code
- Applying warp-level primitives and ballot operations
- Implementing block-level synchronization and barriers
- Analyzing occupancy and resource utilization
Leveraging Cooperative Groups for Flexible Parallelism
- Using the cooperative_groups API and various group types
- Implementing thread-block tiles and tiled partitions
- Executing grid-level cooperative launches
- Designing multi-grid synchronization patterns
Optimizing Shared Memory Techniques
- Managing shared memory banks and avoiding bank conflicts
- Applying tiling strategies for matrix operations
- Using shared memory as a user-managed cache
- Utilizing 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
- Using atomic operations and lock-free data structures
- Employing warp-aggregated atomics to enhance throughput
Profiling and Optimization with Nsight Systems
- Analyzing CPU and GPU activity via timeline views
- Identifying and resolving memory transfer bottlenecks
- Profiling kernel performance and occupancy
- Iteratively refining performance using Nsight Compute
Incorporating Modern C++ Features in CUDA Device Code
- Using lambdas, constexpr, and auto within kernels
- Applying C++17 parallel algorithms and execution policies
- Leveraging C++20 concepts and ranges on the device
- Utilizing C++23 support in nvcc and CCCL 3.x
Advanced Asynchrony with CUDA Graphs
- Defining and executing CUDA graphs
- Capturing graphs from stream execution
- Updating graphs and implementing conditional execution nodes
- Reducing launch latency for iterative workloads
Integration Strategies for Existing Applications
- Abstracting GPU code behind standard C++ interfaces
- Managing resources in multi-GPU and NUMA systems
- Integrating CUDA builds with CMake
- Debugging device code using cuda-gdb
Summary and Best Practices
- Choosing the right approach among Thrust, CUB, or custom kernels
- Ensuring performance portability across different GPU architectures
- Organizing code effectively and using RAII for CUDA resources
- Exploring next steps and advanced CUDA learning paths
Requirements
- Foundational proficiency in C++, including familiarity with lambda expressions, templates, and the STL
- Understanding of standard algorithms, containers, and iterators
- Confidence in working with loops, conditionals, and functions
- No previous experience in CUDA or GPU programming is necessary
Target Audience
- C++ developers looking to boost the speed of compute-intensive applications using GPUs
- Software engineers making the transition from CPU-only to heterogeneous parallel programming
- Performance engineers and quantitative developers working with 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.