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
- Comparing OpenCL with CUDA and SYCL
- Overview of OpenCL features and architectural design
- Configuring the Development Environment
Getting Started
- Initiating a new OpenCL project in Visual Studio Code
- Examining the project structure and associated files
- Compiling and executing the program
- Outputting results using printf and fprintf
OpenCL API
- Understanding the role of the OpenCL API within the host program
- Querying device information and capabilities via the OpenCL API
- Creating contexts, command queues, buffers, kernels, and events using the OpenCL API
- Enqueueing commands such as read, write, copy, map, unmap, execute, and wait via the OpenCL API
- Managing errors and exceptions with the OpenCL API
OpenCL C
- Understanding the role of OpenCL C within the device program
- Writing kernels in OpenCL C to execute on the device and manipulate data
- Using OpenCL C data types, qualifiers, operators, and expressions
- Employing OpenCL C built-in functions for math, geometric, and relational operations
- Integrating OpenCL C extensions and libraries, including atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Distinguishing between host and device memory models
- Utilizing OpenCL memory spaces such as global, local, constant, and private
- Working with OpenCL memory objects including buffers, images, and pipes
- Applying OpenCL memory access modes like read-only, write-only, and read-write
- Implementing the OpenCL memory consistency model and synchronization mechanisms
OpenCL Execution Model
- Distinguishing between host and device execution models
- Defining parallelism using OpenCL work-items, work-groups, and ND-ranges
- Utilizing OpenCL work-item functions such as get_global_id, get_local_id, and get_group_id
- Applying OpenCL work-group functions like barrier, work_group_reduce, and work_group_scan
- Using OpenCL device functions such as get_num_groups, get_global_size, and get_local_size
Debugging
- Identifying 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 OpenCL program performance
- Improving arithmetic throughput using OpenCL vector data types and vectorization techniques
- Reducing control overhead and increasing locality via OpenCL loop unrolling and loop tiling
- Optimizing memory accesses and bandwidth using OpenCL local memory and its associated functions
- Measuring and improving execution time and resource utilization through OpenCL profiling and profiling tools
Requirements
- Familiarity with C/C++ programming languages and core parallel programming concepts
- Foundational knowledge of computer architecture and memory hierarchy
- Proficiency with command-line utilities and code editors
Target Audience
- Developers seeking to master OpenCL for programming heterogeneous devices and exploiting their parallelism
- Developers aiming to create portable, scalable code that performs across various platforms and devices
- Programmers interested in exploring the low-level aspects of heterogeneous programming to optimize code performance