Get in Touch
 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 the 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 using the OpenCL API
  • Enqueuing commands such as read, write, copy, map, unmap, execute, and wait via the OpenCL API
  • Handling errors and exceptions with the OpenCL API

OpenCL C

  • Understanding the role of OpenCL C in the device program
  • Writing device-executable kernels and manipulating data using OpenCL C
  • Utilizing OpenCL C data types, qualifiers, operators, and expressions
  • Using OpenCL C built-in functions for 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 such as global, local, constant, and private
  • Working with OpenCL memory objects such as buffers, images, and pipes
  • Applying OpenCL memory access modes such as read-only, write-only, and read-write
  • Implementing OpenCL memory consistency models 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
  • Employing OpenCL device functions such as 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, 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 loop tiling
  • Optimizing memory accesses and bandwidth using OpenCL local memory and functions
  • Measuring and improving execution time and resource utilization using OpenCL profiling and tools

Requirements

  • Familiarity with C/C++ programming languages and parallel programming concepts.
  • Fundamental knowledge of computer architecture and memory hierarchies.
  • Proficiency with command-line tools and code editors.

Target Audience

  • Developers looking to utilize OpenCL for programming heterogeneous devices and exploiting parallelism.
  • Developers aiming to write portable, scalable code capable of running across different platforms and devices.
  • Programmers interested in exploring low-level aspects of heterogeneous programming to optimize code performance.

Number of participants


Price per participant

Upcoming Courses

Related Categories