Course Outline
Foundations of GPU-Accelerated Computing
- Heterogeneous computing principles and CPU-GPU architectural differences
- Understanding CUDA execution models and memory spaces
- Compiling CUDA C++ code using nvcc and CMake
- Validating the GPU development environment
Parallel Algorithm Implementation with Thrust and CUB
- GPU-accelerated operations for sorting, reduction, and transformation
- Adapting STL algorithms for efficient GPU execution
- Utilizing Thrust device vectors and execution policies
- Employing CUB device-wide primitives for custom processing pipelines
GPU Memory Architecture and Resource Management
- Distinctions between global, constant, and texture memory types
- Managing explicit device memory allocation and data transfers
- Leveraging Unified Memory for streamlined data access
- Optimizing memory coalescing and access patterns
Asynchronous Processing via CUDA Streams
- Creation and management of CUDA streams
- Concurrent execution of kernels and data transfers
- Using CUDA events for managing task dependencies
- Tuning stream priorities and concurrency levels
Development of Custom CUDA Kernels
- Exploring the SIMT programming model and warp-level execution
- Configuring kernel launches and implementing grid-stride loops
- Handling thread indexing within multidimensional grids
- Implementing robust error handling and CUDA runtime API checks
Thread Hierarchy and Execution Mechanics
- Structuring grids, blocks, and threads in device code
- Utilizing warp-level primitives and ballot operations
- Managing block-level synchronization and barriers
- Analyzing occupancy and resource utilization metrics
Flexibility through Cooperative Groups
- Working with the cooperative_groups API and various group types
- Implementing thread-block tiles and tiled_partition
- Executing grid-level cooperative launches
- Designing multi-grid synchronization patterns
Advanced Shared Memory Optimization
- Managing shared memory banks and avoiding bank conflicts
- Applying tiling strategies for efficient matrix operations
- Utilizing shared memory as a user-controlled cache
- Using cuda::shared_memory_mdspan for multidimensional data views
Kernel Fusion and Sophisticated Parallel Patterns
- 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 and Optimization with Nsight Systems
- Conducting timeline analysis of CPU and GPU activities
- Detecting memory transfer bottlenecks
- Profiling kernel performance and occupancy
- Performing iterative optimization using Nsight Compute
Integrating Modern C++ Features into CUDA Device Code
- Applying lambdas, constexpr, and auto types within kernels
- Implementing C++17 parallel algorithms and execution policies
- Leveraging C++20 concepts and ranges on the device
- Supporting C++23 features in nvcc and CCCL 3.x
CUDA Graphs and Advanced Asynchronous Operations
- Defining and launching CUDA graphs
- Capturing graphs from stream execution sequences
- Implementing graph updates and conditional execution nodes
- Minimizing launch latency for iterative workloads
Integration Strategies for Existing Software
- Encapsulating GPU code behind standard C++ interfaces
- Managing multi-GPU configurations and NUMA systems
- Integrating CUDA into build systems using CMake
- Debugging device code with cuda-gdb
Conclusion and Industry Best Practices
- Selecting between Thrust, CUB, and custom kernel implementations
- Achieving performance portability across various GPU architectures
- Organizing code effectively and applying RAII for CUDA resources
- Identifying next steps and advanced CUDA learning pathways
Requirements
- Fundamental proficiency in C++, encompassing lambda expressions, templates, and the Standard Template Library (STL)
- Working knowledge of standard algorithms, containers, and iterators
- Confidence in utilizing loops, conditional structures, and functions
- No previous experience with CUDA or GPU programming is necessary
Target Audience
- C++ developers looking to enhance compute-intensive application performance using GPUs
- Software engineers moving from CPU-exclusive to heterogeneous parallel programming environments
- 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.