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
- Defining OpenCL and its core principles.
- Comparing OpenCL with CUDA and SYCL.
- An overview of key OpenCL features and architectural components.
- Steps to set up the development environment.
Getting Started
- Initiating a new OpenCL project in Visual Studio Code.
- Navigating the project structure and identifying key files.
- Compiling and executing the initial program.
- Displaying output using standard functions like printf and fprintf.
OpenCL API
- The role of the OpenCL API within the host program.
- Querying device information and capabilities via the API.
- Creating and managing contexts, command queues, buffers, kernels, and events.
- Enqueueing commands for reading, writing, copying, mapping, unmapping, execution, and synchronization.
- Effective error and exception handling strategies.
OpenCL C
- The function of OpenCL C in device-side programming.
- Authoring kernels to execute logic and manipulate data on the device.
- Utilizing data types, qualifiers, operators, and expressions in OpenCL C.
- Applying built-in mathematical, geometric, and relational functions.
- Leveraging extensions and libraries, including atomic operations, image processing, and cl_khr_fp16.
OpenCL Memory Model
- Distinguishing between host and device memory architectures.
- Working with memory spaces: global, local, constant, and private.
- Managing memory objects such as buffers, images, and pipes.
- Configuring memory access modes, including read-only, write-only, and read-write.
- Implementing memory consistency and synchronization mechanisms.
OpenCL Execution Model
- Comparing host versus device execution paradigms.
- Defining parallelism through work-items, work-groups, and ND-ranges.
- Using work-item functions like get_global_id, get_local_id, and get_group_id.
- Applying work-group functions such as barrier, work_group_reduce, and work_group_scan.
- Querying device parameters with 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 using the Visual Studio Code debugger.
- Analyzing and debugging OpenCL programs on AMD devices with CodeXL.
- Debugging and analyzing OpenCL performance on Intel devices using Intel VTune.
- Debugging and analyzing OpenCL applications on NVIDIA devices with NVIDIA Nsight.
Optimization
- Factors influencing OpenCL program performance.
- Enhancing arithmetic throughput using vector data types and vectorization.
- Reducing control overhead and improving locality through loop unrolling and tiling.
- Optimizing memory bandwidth using local memory and associated functions.
- Measuring and improving execution time and resource utilization via profiling tools.
Requirements
- A strong command of C/C++ languages and core parallel programming concepts.
- Fundamental knowledge of computer architecture and memory hierarchy.
- Practical experience with command-line utilities and code editors.
Target Audience
- Developers seeking to master OpenCL for programming heterogeneous devices and exploiting their parallelism.
- Professionals aiming to write portable, scalable code that performs consistently across various platforms and devices.
- Programmers interested in exploring the low-level intricacies of heterogeneous computing to optimize code performance.