Get in Touch
 Duration 8 hours

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

Number of participants


Price per participant

Testimonials (3)

Upcoming Courses

Related Categories