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: Core concepts and definitions.
- Comparative analysis of OpenCL, CUDA, and SYCL.
- Overview of key OpenCL features and architectural components.
- Steps to setting up a comprehensive development environment.
Getting Started
- Initiating a new OpenCL project using Visual Studio Code.
- Exploring project structure and essential file components.
- Processes for compiling and running OpenCL programs.
- Techniques for displaying output using printf and fprintf.
OpenCL API
- The role of the OpenCL API in host program management.
- Querying device information and assessing capabilities via the API.
- Creating contexts, command queues, buffers, kernels, and events using the OpenCL API.
- Enqueuing commands such as read, write, copy, map, unmap, execute, and wait.
- Implementing robust error and exception handling within the API.
OpenCL C
- The function of OpenCL C in device-side programming.
- Writing kernels for device execution and data manipulation using OpenCL C.
- Utilizing OpenCL C data types, qualifiers, operators, and expressions.
- Applying built-in functions for math, geometric, and relational operations.
- Leveraging extensions and libraries such as atomic operations, image processing, and cl_khr_fp16.
OpenCL Memory Model
- Distinguishing between host and device memory models.
- Managing memory spaces including global, local, constant, and private.
- Working with memory objects such as buffers, images, and pipes.
- Configuring memory access modes (read-only, write-only, read-write).
- Implementing memory consistency models and synchronization mechanisms.
OpenCL Execution Model
- Understanding the differences between host and device execution models.
- Defining parallelism using work-items, work-groups, and ND-ranges.
- Utilizing work-item functions like get_global_id, get_local_id, and get_group_id.
- Employing work-group functions such as barrier, work_group_reduce, and work_group_scan.
- Applying device functions including get_num_groups, get_global_size, and get_local_size.
Debugging
- Identifying and understanding common errors and bugs in OpenCL programs.
- Inspecting variables, breakpoints, and call stacks using the Visual Studio Code debugger.
- Debugging and analyzing OpenCL programs on AMD devices with CodeXL.
- Debugging and analyzing OpenCL programs on Intel devices with Intel VTune.
- Debugging and analyzing OpenCL programs on NVIDIA devices with NVIDIA Nsight.
Optimization
- Analyzing factors that influence the performance of OpenCL programs.
- Improving arithmetic throughput using OpenCL vector data types and vectorization techniques.
- Reducing control overhead and increasing locality through loop unrolling and loop tiling.
- Optimizing memory access and bandwidth using local memory and local memory functions.
- Measuring and improving execution time and resource utilization via OpenCL profiling and associated tools.
Requirements
- Familiarity with C/C++ programming languages and core parallel programming concepts.
- Foundational knowledge of computer architecture and memory hierarchy.
- Practical experience with command-line tools 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 programming to optimize code performance.