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
- Comparison of OpenCL, CUDA, and SYCL
- Overview of OpenCL features and architectural design
- Setting up the Development Environment
Getting Started
- Initiating a new OpenCL project in Visual Studio Code
- Examining project structure and file organization
- Compiling and executing the program
- Displaying output via printf and fprintf
OpenCL API
- The role of the OpenCL API within the host program
- Querying device information and capabilities using the OpenCL API
- Creating contexts, command queues, buffers, kernels, and events
- Enqueuing commands such as read, write, copy, map, unmap, execute, and wait
- Handling errors and exceptions via the OpenCL API
OpenCL C
- The role of OpenCL C in device-side programming
- Writing kernels for device execution and data manipulation
- Utilizing OpenCL C data types, qualifiers, operators, and expressions
- Applying built-in functions for math, geometry, and relational operations
- Using extensions and libraries like atomic, image, and cl_khr_fp16
OpenCL Memory Model
- Differences between host and device memory models
- Utilizing memory spaces: global, local, constant, and private
- Working with memory objects such as buffers, images, and pipes
- Configuring memory access modes: read-only, write-only, and read-write
- Understanding the memory consistency model and synchronization mechanisms
OpenCL Execution Model
- Distinctions 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
- Applying work-group functions such as barrier, work_group_reduce, and work_group_scan
- Leveraging device functions including get_num_groups, get_global_size, and get_local_size
Debugging
- Identifying common errors and bugs in OpenCL code
- Inspecting variables, breakpoints, and call stacks with 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
- Factors influencing OpenCL program performance
- Enhancing arithmetic throughput with vector data types and vectorization
- Reducing control overhead and improving locality via loop unrolling and tiling
- Optimizing memory access and bandwidth using local memory and related functions
- Measuring and improving execution time and resource utilization through profiling tools
Requirements
- Familiarity with C/C++ programming and core parallel computing concepts
- Foundational understanding of computer architecture and memory hierarchies
- Proficiency with command-line utilities and code editors
Target Audience
- Developers aiming to master OpenCL for heterogeneous device programming and parallelism exploitation
- Engineers seeking to write portable, scalable code compatible with diverse platforms and hardware
- Programmers interested in exploring low-level aspects of heterogeneous computing to optimize code performance