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
- Fundamentals of OpenCL
- Comparison: OpenCL vs. CUDA vs. SYCL
- Overview of OpenCL features and architectural design
- Establishing the Development Environment
Initial Steps
- Creating a new OpenCL project in Visual Studio Code
- Examining the project structure and file organization
- Compiling and executing the program
- Displaying output results using printf and fprintf
OpenCL API
- Comprehending the function of the OpenCL API within the host program
- Querying device information and capabilities via the OpenCL API
- Instantiating contexts, command queues, buffers, kernels, and events using the OpenCL API
- Enqueuing commands such as read, write, copy, map, unmap, execute, and wait through the OpenCL API
- Handling errors and exceptions using the OpenCL API
OpenCL C
- Understanding the role of OpenCL C in device-side programming
- Writing OpenCL C kernels that execute on the device and manipulate data
- Using OpenCL C data types, qualifiers, operators, and expressions
- Leveraging OpenCL C built-in functions, including math, geometric, and relational operations
- Utilizing OpenCL C 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, including global, local, constant, and private
- Managing OpenCL memory objects such as buffers, images, and pipes
- Applying OpenCL memory access modes like read-only, write-only, and read-write
- Implementing OpenCL memory consistency models and synchronization mechanisms
OpenCL Execution Model
- Differentiating between host and device execution models
- Defining parallelism using OpenCL work-items, work-groups, and ND-ranges
- Utilizing 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
- Using OpenCL 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 with Intel VTune
- Debugging and analyzing OpenCL programs on NVIDIA devices with NVIDIA Nsight
Optimization
- Analyzing factors that influence OpenCL program performance
- Enhancing arithmetic throughput using OpenCL vector data types and vectorization techniques
- Reducing control overhead and improving locality via OpenCL loop unrolling and loop tiling
- Optimizing memory access 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++ programming languages and concepts of parallel processing
- Fundamental knowledge of computer architecture and memory hierarchies
- Proficiency with command-line interfaces and code editors
Target Audience
- Developers eager to master OpenCL for programming heterogeneous devices and exploiting their parallel nature
- Developers aiming to write portable and scalable code that operates seamlessly across different platforms and devices
- Programmers interested in exploring the low-level intricacies of heterogeneous programming to enhance code performance