Get in Touch
 Duration 8 hours

Course Outline

Foundations of GPU-Accelerated Computing

  • Heterogeneous computing principles and CPU-GPU architectural differences
  • CUDA execution models and memory hierarchies
  • Compiling CUDA C++ code using nvcc and CMake
  • Validating the GPU development environment

Parallel Algorithms via 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 in custom pipelines

GPU Memory Architecture and Control

  • Overview of global, constant, and texture memory types
  • Manual device memory allocation and data transfer
  • Using Unified Memory for streamlined data access
  • Optimizing memory coalescing and access patterns

Asynchronous Execution through CUDA Streams

  • Creation and management of CUDA streams
  • Overlapping kernel execution with data transfer operations
  • Managing dependencies with CUDA events
  • Adjusting stream priorities and concurrency settings

Developing Custom CUDA Kernels

  • The SIMT programming model and warp-level execution
  • Configuring kernel launches and implementing grid-stride loops
  • Thread indexing techniques and multidimensional grid layouts
  • Error handling and checking CUDA runtime API calls

Thread Hierarchy and Execution Models

  • Managing grids, blocks, and threads within device code
  • Utilizing warp-level primitives and ballot operations
  • Implementing block-level synchronization and barriers
  • Analyzing occupancy and resource utilization

Cooperative Groups for Flexible Parallelism

  • Exploring the cooperative_groups API and various group types
  • Using thread-block tiles and the tiled_partition utility
  • Executing grid-level cooperative launches
  • Implementing multi-grid synchronization patterns

Shared Memory Optimization Strategies

  • Understanding shared memory banks and avoiding bank conflicts
  • Employing tiling strategies for matrix calculations
  • Treating 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
  • Leveraging warp-aggregated atomics for improved throughput

Profiling and Tuning with Nsight Systems

  • Analyzing CPU and GPU activity timelines
  • Detecting memory transfer bottlenecks
  • Profiling kernel performance and occupancy levels
  • Iterative optimization workflows using Nsight Compute

Modern C++ Features in CUDA Device Code

  • Application of lambdas, constexpr, and auto within kernels
  • Using C++17 parallel algorithms and execution policies
  • Incorporating C++20 concepts and ranges on the device
  • Support for 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 using conditional execution nodes
  • Reducing launch latency for iterative workloads

Integration Patterns for Existing Applications

  • Encapsulating GPU code behind standard C++ interfaces
  • Managing multi-GPU and NUMA-based systems
  • Integrating build systems with CMake and CUDA
  • Debugging device code using cuda-gdb

Summary and Best Practices

  • Selecting between Thrust, CUB, and custom kernel implementations
  • Ensuring performance portability across different GPU architectures
  • Organizing code and applying RAII for CUDA resource management
  • Exploring next steps and advanced CUDA learning paths

Requirements

  • Foundational C++ proficiency, including lambda expressions, templates, and the STL.
  • Working knowledge of standard algorithms, containers, and iterators.
  • Confidence in implementing loops, conditionals, and functions.
  • No prior experience with CUDA or GPU programming is necessary.

Target Audience

  • C++ developers aiming to boost the speed of compute-heavy applications using GPUs.
  • Software engineers moving from CPU-only environments to heterogeneous parallel processing.
  • Performance engineers and quantitative developers handling large-scale datasets.

Number of participants


Price per participant

Testimonials (3)

Upcoming Courses

Related Categories