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?
- Comparison of 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 the project structure and files
- Compiling and running the program
- Displaying output using printf and fprintf
OpenCL API
- Understanding the role of the OpenCL API in the host program
- Querying device information and capabilities using the OpenCL API
- Creating contexts, command queues, buffers, kernels, and events via the OpenCL API
- Enqueuing commands such as read, write, copy, map, unmap, execute, and wait
- Handling errors and exceptions using the OpenCL API
OpenCL C
- Understanding the role of OpenCL C in the device program
- Writing kernels in OpenCL C that execute on the device and manipulate data
- Using OpenCL C data types, qualifiers, operators, and expressions
- Leveraging OpenCL C built-in functions for math, geometric, and relational operations
- Utilizing OpenCL C extensions and libraries, such as atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Understanding the difference between host and device memory models
- Working with OpenCL memory spaces such as global, local, constant, and private
- Managing OpenCL memory objects including buffers, images, and pipes
- Applying OpenCL memory access modes such as read-only, write-only, and read-write
- Utilizing the OpenCL memory consistency model and synchronization mechanisms
OpenCL Execution Model
- Understanding the difference 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
- Utilizing OpenCL work-group functions such as 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
- Using the Visual Studio Code debugger to inspect variables, breakpoints, and call stacks
- Debugging and analyzing OpenCL programs on AMD devices using CodeXL
- Debugging and analyzing OpenCL programs on Intel devices using Intel VTune
- Debugging and analyzing OpenCL programs on NVIDIA devices using NVIDIA Nsight
Optimization
- Understanding factors that affect OpenCL program performance
- Improving arithmetic throughput using OpenCL vector data types and vectorization techniques
- Reducing control overhead and increasing locality using OpenCL loop unrolling and tiling techniques
- Optimizing memory access and bandwidth using OpenCL local memory and functions
- Measuring and improving execution time and resource utilization using OpenCL profiling tools
Requirements
- Familiarity with the C/C++ language and parallel programming concepts
- Basic knowledge of computer architecture and memory hierarchy
- Experience with command-line tools and code editors
Target Audience
- Developers seeking to learn how to use OpenCL to program heterogeneous devices and exploit their parallelism
- Developers aiming to write portable and scalable code that operates across different platforms and devices
- Programmers interested in exploring the low-level aspects of heterogeneous programming and optimizing code performance