Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • Understanding what OpenCL is
  • Comparing OpenCL with CUDA and SYCL
  • Overview of OpenCL features and architectural design
  • Setting up the development environment

Getting Started

  • Creating a new OpenCL project in Visual Studio Code
  • Exploring project structure and essential files
  • Compiling and executing the program
  • Displaying output using printf and fprintf

OpenCL API

  • Understanding the role of the OpenCL API within the host program
  • Querying device information and capabilities via the OpenCL API
  • Creating contexts, command queues, buffers, kernels, and events using the API
  • Enqueuing commands such as read, write, copy, map, unmap, execute, and wait
  • Handling errors and exceptions through the OpenCL API

OpenCL C

  • Understanding 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, including atomic operations, image processing, 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 such as buffers, images, and pipes
  • Configuring memory access modes like read-only, write-only, and read-write
  • Applying the memory consistency model and synchronization mechanisms

OpenCL Execution Model

  • Distinguishing 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 like get_num_groups, get_global_size, and get_local_size

Debugging

  • Identifying common errors and bugs in OpenCL programs
  • 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

  • Understanding factors influencing OpenCL program performance
  • Improving arithmetic throughput via vector data types and vectorization
  • Reducing control overhead and increasing locality using 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 and tools

Requirements

  • Familiarity with C/C++ programming and core concepts of parallel computing.
  • Foundational knowledge of computer architecture and memory hierarchies.
  • Proficiency with command-line interfaces and code editors.

Target 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 aspects and optimizing code performance.

Number of participants


Price per participant

Upcoming Courses

Related Categories