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
- Overview of OpenCL concepts.
- Comparison: OpenCL vs. CUDA vs. SYCL.
- Key features and architectural overview of OpenCL.
- Setting up the development environment.
Getting Started
- Creating a new OpenCL project in Visual Studio Code.
- Exploring project structure and core files.
- Compiling and executing the program.
- Outputting results using printf and fprintf.
OpenCL API
- The role of the OpenCL API within host programs.
- Querying device information and capabilities via the API.
- Creating contexts, command queues, buffers, kernels, and events.
- Enqueuing commands such as read, write, copy, map, unmap, execute, and wait.
- Handling errors and exceptions using the OpenCL API.
OpenCL C
- The role of OpenCL C in device-side programming.
- Writing kernels for device execution and data manipulation.
- Using OpenCL C data types, qualifiers, operators, and expressions.
- Leveraging built-in functions for math, geometry, and relational operations.
- Utilizing extensions and libraries like atomic operations, image processing, and cl_khr_fp16.
OpenCL Memory Model
- Differences between host and device memory models.
- Working with memory spaces: global, local, constant, and private.
- Managing memory objects including buffers, images, and pipes.
- Applying memory access modes: read-only, write-only, and read-write.
- Understanding the memory consistency model and synchronization mechanisms.
OpenCL Execution Model
- Differences between host and device execution models.
- Defining parallelism using work-items, work-groups, and ND-ranges.
- Using work-item functions like get_global_id, get_local_id, and get_group_id.
- Utilizing work-group functions such as barrier, work_group_reduce, and work_group_scan.
- Accessing device functions like get_num_groups, get_global_size, and get_local_size.
Debugging
- Identifying common errors and bugs in OpenCL applications.
- Inspecting variables, breakpoints, and call stacks with the Visual Studio Code debugger.
- Debugging and analyzing programs on AMD devices using CodeXL.
- Debugging and analyzing programs on Intel devices using Intel VTune.
- Debugging and analyzing programs on NVIDIA devices using NVIDIA Nsight.
Optimization
- Factors influencing OpenCL program performance.
- Improving arithmetic throughput with vector data types and vectorization.
- Reducing control overhead and increasing locality through loop unrolling and tiling.
- Optimizing memory access and bandwidth using local memory and associated functions.
- Measuring and enhancing execution time and resource utilization via profiling tools.
Requirements
- Familiarity with C/C++ programming and parallel computing principles.
- Foundational understanding of computer architecture and memory hierarchy.
- Practical experience with command-line interfaces and code editors.
Target Audience
- Developers seeking to master OpenCL for heterogeneous device programming and parallelism exploitation.
- Engineers aiming to write portable, scalable code compatible with diverse platforms and devices.
- Programmers interested in exploring the low-level intricacies of heterogeneous computing to optimize code performance.