Thank you for sending your enquiry! One of our team members will contact you shortly.
Thank you for sending your booking! One of our team members will contact you shortly.
Duration 28 hours
Course Outline
Introduction
- Definition and scope of CUDA.
- Comparison of CUDA, OpenCL, and SYCL.
- Overview of CUDA features and architecture.
- Setting up the Development Environment.
Getting Started
- Creating a new CUDA project in Visual Studio Code.
- Exploring project structure and files.
- Compiling and executing the program.
- Displaying output using printf and fprintf.
CUDA API
- The role of the CUDA API in host-side programming.
- Querying device information and capabilities via the CUDA API.
- Managing device memory allocation and deallocation using 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 with the CUDA API.
CUDA C/C++
- The role of CUDA C/C++ in device-side programming.
- Writing kernels in CUDA C/C++ for GPU execution and data manipulation.
- Using CUDA C/C++ data types, qualifiers, operators, and expressions.
- Employing CUDA C/C++ built-in functions, including math, atomic, and warp operations.
- Utilizing CUDA C/C++ built-in variables such as threadIdx, blockIdx, and blockDim.
- Working with CUDA C/C++ libraries like cuBLAS, cuFFT, and cuRAND.
CUDA Memory Model
- Differences between host and device memory models.
- Using CUDA memory spaces: global, shared, constant, and local.
- Working with CUDA memory objects such as pointers, arrays, textures, and surfaces.
- Applying CUDA memory access modes, including read-only, write-only, and read-write.
- Understanding the CUDA memory consistency model and synchronization mechanisms.
CUDA Execution Model
- 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 like __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, set breakpoints, and review the call stack.
- 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
- Factors influencing CUDA program performance.
- Improving memory throughput with CUDA coalescing techniques.
- Reducing memory latency through CUDA caching and prefetching.
- Optimizing memory access and bandwidth using CUDA shared and local memory.
- Measuring and improving execution time and resource utilization with CUDA profiling tools.
Requirements
- Familiarity with the C/C++ language and concepts of parallel programming.
- Foundational knowledge of computer architecture and memory hierarchy.
- Experience working with command-line tools and code editors.
Target Audience
- Developers seeking to master CUDA for programming NVIDIA GPUs and leveraging their parallelism.
- Developers aiming to write high-performance, scalable code compatible with various CUDA devices.
- Programmers interested in exploring the low-level aspects of GPU programming to optimize code performance.