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
- Overview of OpenCL
- Comparing OpenCL, CUDA, and SYCL
- Key features and architectural components of OpenCL
- Configuring the development environment
Getting Started
- Creating a new OpenCL project in Visual Studio Code
- Navigating project structure and essential files
- Compiling and executing the program
- Displaying output using printf and fprintf functions
OpenCL API
- The role of the OpenCL API within host programs
- Querying device information and capabilities via the API
- Creating contexts, command queues, buffers, kernels, and events
- Enqueueing commands such as read, write, copy, map, unmap, execute, and wait
- Handling errors and exceptions effectively
OpenCL C
- The role of OpenCL C in device-side programming
- Writing kernels for device execution and data manipulation
- Utilizing data types, qualifiers, operators, and expressions in OpenCL C
- Employing built-in functions for math, geometry, and relational operations
- Using extensions and libraries such as atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Distinguishing between host and device memory models
- Working with memory spaces: global, local, constant, and private
- Managing memory objects like buffers, images, and pipes
- Applying memory access modes: read-only, write-only, and read-write
- Understanding the memory consistency model and synchronization mechanisms
OpenCL Execution Model
- Differences between host and device execution models
- Defining parallelism using work-items, work-groups, and ND-ranges
- Using work-item functions like get_global_id, get_local_id, and get_group_id
- Utilizing work-group functions such as barrier, work_group_reduce, and work_group_scan
- Applying device functions including get_num_groups, get_global_size, and get_local_size
Debugging
- Identifying common errors and bugs in OpenCL applications
- 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 using Intel VTune
- Debugging and analyzing OpenCL programs on NVIDIA devices with NVIDIA Nsight
Optimization
- 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 related functions
- Measuring and improving execution time and resource utilization through profiling tools
Requirements
- Proficiency in C/C++ programming and an understanding of parallel computing principles
- Familiarity with computer architecture and memory hierarchy concepts
- Comfort with command-line interfaces and code editors
Intended Audience
- Developers seeking to master OpenCL for heterogeneous device programming and parallelism exploitation
- Engineers aiming to write portable, scalable code capable of running across various platforms and devices
- Programmers interested in exploring low-level heterogeneous programming to optimize code performance