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 vs CUDA vs 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 the output using printf and fprintf
OpenCL API
- Understanding the role of the OpenCL API in the host program
- Using the OpenCL API to query device information and capabilities
- Creating contexts, command queues, buffers, kernels, and events via the OpenCL API
- Enqueueing commands such as read, write, copy, map, unmap, execute, and wait using the OpenCL API
- Handling errors and exceptions using the OpenCL API
OpenCL C
- Understanding the role of OpenCL C in the device program
- Writing kernels that execute on the device and manipulate data using OpenCL C
- Utilizing OpenCL C data types, qualifiers, operators, and expressions
- Using OpenCL C built-in functions, including math, geometric, and relational operations
- Leveraging 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
- Using OpenCL memory spaces, including global, local, constant, and private
- Working with OpenCL memory objects such as buffers, images, and pipes
- Applying OpenCL memory access modes like 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 like get_global_id, get_local_id, and get_group_id
- Applying OpenCL work-group functions such as barrier, work_group_reduce, and work_group_scan
- Utilizing OpenCL device functions including get_num_groups, get_global_size, and get_local_size
Debugging
- Understanding common errors and bugs in OpenCL programs
- Using the Visual Studio Code debugger to inspect variables, set breakpoints, and review the call stack
- 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 the performance of OpenCL programs
- Improving arithmetic throughput using OpenCL vector data types and vectorization techniques
- Reducing control overhead and increasing locality using OpenCL loop unrolling and loop tiling techniques
- Optimizing memory accesses and bandwidth using OpenCL local memory and local memory functions
- Measuring and improving execution time and resource utilization using OpenCL profiling and profiling tools
Requirements
- Familiarity with C/C++ language and parallel programming concepts
- Basic knowledge of computer architecture and memory hierarchy
- Experience using command-line tools and code editors
Audience
- Developers looking to learn how to use OpenCL for programming heterogeneous devices and exploiting their parallelism
- Developers aiming to write portable and scalable code that runs across different platforms and devices
- Programmers interested in exploring the low-level aspects of heterogeneous programming and optimizing code performance