Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • Fundamentals of OpenCL
  • Comparing OpenCL, CUDA, and SYCL
  • Overview of OpenCL features and architectural components
  • Configuring the development environment

Getting Started

  • Initialising a new OpenCL project in Visual Studio Code
  • Examining project structure and file organisation
  • Compiling and executing the programme
  • Outputting results using printf and fprintf

OpenCL API

  • The role of the OpenCL API within the host programme
  • Querying device information and capabilities via the 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 through the API

OpenCL C

  • The role of OpenCL C in device-side programming
  • Writing kernels in OpenCL C to execute on the device and manipulate data
  • Utilising OpenCL C data types, qualifiers, operators, and expressions
  • Applying built-in functions for mathematical, geometric, and relational operations
  • Working with extensions and libraries such as atomic operations, image processing, and cl_khr_fp16

OpenCL Memory Model

  • Distinguishing between host and device memory models
  • Working with memory spaces including 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
  • Implementing memory consistency models and synchronisation mechanisms

OpenCL Execution Model

  • Differentiating host and device execution models
  • Defining parallelism using work-items, work-groups, and ND-ranges
  • Using work-item functions such as get_global_id, get_local_id, and get_group_id
  • Applying work-group functions like 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 programmes
  • Using the Visual Studio Code debugger to inspect variables, breakpoints, and the call stack
  • Debugging and analysing OpenCL programmes on AMD devices with CodeXL
  • Debugging and analysing OpenCL programmes on Intel devices with Intel VTune
  • Debugging and analysing OpenCL programmes on NVIDIA devices with NVIDIA Nsight

Optimisation

  • Understanding factors that influence OpenCL programme performance
  • Improving arithmetic throughput with vector data types and vectorisation techniques
  • Reducing control overhead and increasing locality through loop unrolling and tiling
  • Optimising memory access and bandwidth using local memory and related functions
  • Measuring and enhancing execution time and resource utilisation via OpenCL profiling tools

Requirements

  • Proficiency in C/C++ and a grasp of parallel programming principles
  • Familiarity with computer architecture and memory hierarchies
  • Practical experience with command-line utilities and code editors

Target Audience

  • Developers aiming to master OpenCL for programming heterogeneous hardware and leveraging its parallel capabilities
  • Professionals seeking to write portable, scalable code that performs consistently across diverse platforms and devices
  • Programmers interested in exploring low-level heterogeneous computing aspects and optimising code performance

Number of participants


Price per participant

Provisional Upcoming Courses (Require 5+ participants)

Related Categories