Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • Defining CUDA
  • Comparison: CUDA vs. OpenCL vs. SYCL
  • Overview of key CUDA features and architectural design
  • Configuration of the development environment

Getting Started

  • Initiating a new CUDA project in Visual Studio Code
  • Exploring project structure and file organization
  • Compiling and executing the program
  • Outputting results using printf and fprintf

CUDA API

  • The role of the CUDA API within host programs
  • Querying device information and capabilities via the CUDA API
  • Managing device memory allocation and deallocation with the CUDA API
  • Transferring data between host and device using the CUDA API
  • Launching kernels and synchronizing threads through the CUDA API
  • Handling errors and exceptions using the CUDA API

CUDA C/C++

  • The function of CUDA C/C++ in device-side programming
  • Writing kernels in CUDA C/C++ for GPU execution and data manipulation
  • Applying CUDA C/C++ data types, qualifiers, operators, and expressions
  • Utilizing built-in functions in CUDA C/C++, such as math, atomic, and warp operations
  • Leveraging built-in variables in CUDA C/C++, including threadIdx, blockIdx, and blockDim
  • Integrating CUDA C/C++ libraries like cuBLAS, cuFFT, and cuRAND

CUDA Memory Model

  • Distinguishing between host and device memory models
  • Implementing CUDA memory spaces: global, shared, constant, and local
  • Working with CUDA memory objects such as pointers, arrays, textures, and surfaces
  • Applying memory access modes: read-only, write-only, and read-write
  • Understanding the CUDA memory consistency model and synchronization mechanisms

CUDA Execution Model

  • Differentiating between host and device execution models
  • Defining parallelism using CUDA threads, blocks, and grids
  • Using thread-related functions in CUDA, such as threadIdx, blockIdx, and blockDim
  • Employing block-level functions in CUDA, including __syncthreads and __threadfence_block
  • Leveraging grid-level functions in CUDA, such as gridDim, gridSync, and cooperative groups

Debugging

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

Optimization

  • Understanding factors impacting CUDA program performance
  • Improving memory throughput via CUDA coalescing techniques
  • Reducing memory latency using CUDA caching and prefetching methods
  • Optimizing memory access and bandwidth with shared and local memory techniques
  • Measuring and improving execution time and resource utilization through CUDA profiling and associated tools

Requirements

  • Solid comprehension of C/C++ language fundamentals and parallel programming principles
  • Foundational knowledge of computer architecture and memory hierarchy
  • Practical experience with command-line interfaces and code editors

Target Audience

  • Developers seeking to master CUDA for NVIDIA GPU programming and exploit parallel capabilities
  • Developers aiming to produce high-performance, scalable code compatible with various CUDA-enabled devices
  • Programmers interested in exploring low-level GPU programming aspects to optimize code efficiency

Number of participants


Price per participant

Upcoming Courses

Related Categories