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
- An overview of OpenCL
- Comparing OpenCL, CUDA, and SYCL
- Survey of OpenCL features and architectural design
- Preparing 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
- Displaying output 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
- Enqueuing 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 device tasks and manipulate data
- Utilizing OpenCL C data types, qualifiers, operators, and expressions
- Employing built-in functions for math, geometry, and relations
- Incorporating extensions and libraries such as atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Distinguishing between host and device memory models
- Working with OpenCL memory spaces: global, local, constant, and private
- Managing OpenCL memory objects: buffers, images, and pipes
- Applying memory access modes: 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 work-items, work-groups, and ND-ranges
- Using work-item functions such as get_global_id, get_local_id, and get_group_id
- Applying work-group functions such as barrier, work_group_reduce, and work_group_scan
- Utilizing 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 influencing OpenCL program performance
- Improving arithmetic throughput using vector data types and vectorization
- Reducing control overhead and increasing locality via loop unrolling and tiling
- Optimizing memory access and bandwidth with local memory and associated functions
- Measuring and enhancing execution time and resource utilization through profiling tools
Requirements
- Familiarity with the C/C++ language and core concepts of parallel programming.
- Foundational knowledge of computer architecture and memory hierarchy.
- Proficiency with command-line utilities and code editors.
Target Audience
- Developers seeking to master OpenCL for heterogeneous device programming and parallelism exploitation.
- Developers aiming to produce portable, scalable code capable of running across various platforms and devices.
- Programmers interested in exploring the low-level intricacies of heterogeneous computing to optimize code performance.