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
- What is OpenCL?
- Comparing OpenCL, CUDA, and SYCL
- Overview of OpenCL features and architecture
- Setting up the development environment
Getting Started
- Creating a new OpenCL project using Visual Studio Code
- Exploring project structure and file organisation
- Compiling and executing the program
- Displaying output using printf and fprintf
OpenCL API
- Understanding the role of the OpenCL API within host programs
- Querying device information and capabilities via the OpenCL API
- Creating contexts, command queues, buffers, kernels, and events using the API
- Enqueueing commands such as read, write, copy, map, unmap, execute, and wait
- Handling errors and exceptions through the OpenCL API
OpenCL C
- Understanding the role of OpenCL C in device-side programming
- Writing OpenCL C kernels to execute on the device and manipulate data
- Utilising OpenCL C data types, qualifiers, operators, and expressions
- Using OpenCL C built-in functions for math, geometry, and relations
- Leveraging OpenCL C extensions and libraries, including atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Distinguishing between host and device memory models
- Using OpenCL memory spaces: global, local, constant, and private
- Managing OpenCL memory objects such as buffers, images, and pipes
- Applying OpenCL memory access modes like read-only, write-only, and read-write
- Utilising the OpenCL memory consistency model and synchronisation mechanisms
OpenCL Execution Model
- Distinguishing between host and device execution models
- Defining parallelism using OpenCL work-items, work-groups, and ND-ranges
- Using OpenCL work-item functions such as get_global_id, get_local_id, and get_group_id
- Employing OpenCL work-group functions like barrier, work_group_reduce, and work_group_scan
- Utilising OpenCL device functions such as get_num_groups, get_global_size, and get_local_size
Debugging
- Identifying common errors and bugs in OpenCL programs
- Using the Visual Studio Code debugger to inspect variables, set breakpoints, and analyse the call stack
- Debugging and analysing OpenCL programs on AMD devices using CodeXL
- Debugging and analysing OpenCL programs on Intel devices using Intel VTune
- Debugging and analysing OpenCL programs on NVIDIA devices using NVIDIA Nsight
Optimisation
- Understanding factors that influence OpenCL program performance
- Improving arithmetic throughput using OpenCL vector data types and vectorisation techniques
- Reducing control overhead and increasing locality through loop unrolling and loop tiling
- Optimising memory access and bandwidth using OpenCL local memory and its functions
- Measuring and improving execution time and resource utilisation through OpenCL profiling and tools
Requirements
- Familiarity with C/C++ programming and core parallel computing concepts
- Foundational knowledge of computer architecture and memory hierarchies
- Practical experience with command-line interfaces and code editors
Audience
- Developers seeking to master OpenCL for programming heterogeneous devices and harnessing their parallelism.
- Developers aiming to write portable, scalable code compatible across diverse platforms and devices.
- Programmers interested in exploring the low-level intricacies of heterogeneous computing to optimise code performance.