Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • What is CUDA?
  • Comparison of CUDA vs OpenCL vs SYCL
  • Overview of CUDA features and architecture
  • Setting up the Development Environment

Getting Started

  • Creating a new CUDA project in Visual Studio Code
  • Exploring the project structure and files
  • Compiling and running the program
  • Displaying output using printf and fprintf

CUDA API

  • Understanding the role of the CUDA API in host programs
  • Using the CUDA API to query device information and capabilities
  • Using the CUDA API to allocate and deallocate device memory
  • Using the CUDA API to transfer data between host and device
  • Using the CUDA API to launch kernels and synchronize threads
  • Using the CUDA API to handle errors and exceptions

CUDA C/C++

  • Understanding the role of CUDA C/C++ in device programs
  • Writing kernels in CUDA C/C++ that execute on the GPU and manipulate data
  • Using CUDA C/C++ data types, qualifiers, operators, and expressions
  • Utilizing CUDA C/C++ built-in functions, such as math, atomic, and warp operations
  • Utilizing CUDA C/C++ built-in variables, such as threadIdx, blockIdx, and blockDim
  • Leveraging CUDA C/C++ libraries, including cuBLAS, cuFFT, and cuRAND

CUDA Memory Model

  • Understanding the differences between host and device memory models
  • Using CUDA memory spaces, such as global, shared, constant, and local
  • Managing CUDA memory objects, including pointers, arrays, textures, and surfaces
  • Applying CUDA memory access modes, such as read-only, write-only, and read-write
  • Utilizing the CUDA memory consistency model and synchronization mechanisms

CUDA Execution Model

  • Understanding the differences between host and device execution models
  • Defining parallelism using CUDA threads, blocks, and grids
  • Using CUDA thread functions, such as threadIdx, blockIdx, and blockDim
  • Employing CUDA block functions, such as __syncthreads and __threadfence_block
  • Utilizing CUDA grid functions, including gridDim, gridSync, and cooperative groups

Debugging

  • Identifying common errors and bugs in CUDA programs
  • Using the Visual Studio Code debugger to inspect variables, breakpoints, and call stacks
  • Debugging CUDA programs on Linux using CUDA-GDB
  • Detecting memory errors and leaks with CUDA-MEMCHECK
  • Debugging and analyzing CUDA programs on Windows using NVIDIA Nsight

Optimization

  • Understanding factors that impact CUDA program performance
  • Applying CUDA coalescing techniques to improve memory throughput
  • Using CUDA caching and prefetching techniques to reduce memory latency
  • Optimizing memory access and bandwidth with CUDA shared and local memory techniques
  • Measuring and improving execution time and resource utilization through CUDA profiling and tools

Requirements

  • A solid understanding of C/C++ programming and parallel computing concepts
  • Fundamental knowledge of computer architecture and memory hierarchy
  • Proficiency with command-line tools and code editors

Audience

  • Developers looking to master CUDA for programming NVIDIA GPUs and exploiting their parallelism
  • Developers aiming to write high-performance, scalable code compatible with various CUDA devices
  • Programmers interested in exploring low-level GPU programming aspects and optimizing code performance

Number of participants


Price per participant (excl. VAT)

Upcoming Courses

Related Categories