Get in Touch

Course Outline

Introduction

  • Overview of CUDA.
  • Comparison of CUDA, OpenCL, and SYCL.
  • Summary of CUDA features and architecture.
  • Setup of the development environment.

Getting Started

  • Creating a new CUDA project in Visual Studio Code.
  • Examining project structure and files.
  • Compiling and executing the program.
  • Displaying output via printf and fprintf.

CUDA API

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

CUDA C/C++

  • Understanding the role of CUDA C/C++ in device-side programming.
  • Writing kernels for GPU execution and data manipulation using CUDA C/C++.
  • Working with CUDA C/C++ data types, qualifiers, operators, and expressions.
  • Utilizing CUDA C/C++ built-in functions, including math, atomic, and warp operations.
  • Using CUDA C/C++ built-in variables, such as threadIdx, blockIdx, and blockDim.
  • Applying CUDA C/C++ libraries like cuBLAS, cuFFT, and cuRAND.

CUDA Memory Model

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

CUDA Execution Model

  • Distinguishing between host and device execution models.
  • Defining parallelism using CUDA threads, blocks, and grids.
  • Utilizing CUDA thread functions, including threadIdx, blockIdx, and blockDim.
  • Applying CUDA block functions, such as __syncthreads and __threadfence_block.
  • Using CUDA grid functions, including 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 using NVIDIA Nsight.

Optimization

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

Summary and Next Steps

Requirements

  • Familiarity with C/C++ and parallel programming concepts.
  • Foundational knowledge of computer architecture and memory hierarchy.
  • Experience using command-line interfaces and code editors.

Target Audience

  • Developers seeking to learn CUDA programming for NVIDIA GPUs and exploit their parallelism.
  • Developers aiming to write high-performance, scalable code compatible with various CUDA-enabled devices.
  • Programmers interested in exploring the low-level aspects of GPU programming to optimize code performance.
 28 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories