Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • Defining OpenCL
  • Comparing OpenCL with CUDA and SYCL
  • Overview of OpenCL features and architectural design
  • Configuring the Development Environment

Getting Started

  • Initiating a new OpenCL project in Visual Studio Code
  • Examining the project structure and associated files
  • Compiling and executing the program
  • Displaying output using printf and fprintf functions

OpenCL API

  • Understanding the OpenCL API's role within the host program
  • Querying device information and capabilities via 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
  • Handling errors and exceptions through the OpenCL API

OpenCL C

  • Understanding the role of OpenCL C in device-side programming
  • Writing kernels in OpenCL C to execute on the device and manipulate data
  • Using OpenCL C data types, qualifiers, operators, and expressions
  • Applying OpenCL C built-in functions, including mathematical, 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, such as read-only, write-only, and read-write
  • Implementing the OpenCL memory consistency model and synchronization mechanisms

OpenCL Execution Model

  • Distinguishing 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
  • Employing OpenCL work-group functions, including barrier, work_group_reduce, and work_group_scan
  • Utilizing OpenCL device functions, such as 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 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

  • Analyzing factors that impact OpenCL program performance
  • Improving arithmetic throughput using OpenCL vector data types and vectorization techniques
  • Reducing control overhead and increasing locality through OpenCL loop unrolling and loop tiling
  • Optimizing memory access and bandwidth using OpenCL local memory and related functions
  • Measuring and improving execution time and resource utilization via OpenCL profiling and associated tools

Requirements

  • Familiarity with the C/C++ programming language and concepts of parallel programming
  • Foundational knowledge of computer architecture and memory hierarchies
  • Practical experience with command-line utilities and code editors

Audience

  • Developers aiming to master OpenCL for programming heterogeneous devices and exploiting their parallel capabilities
  • Developers seeking to write portable and scalable code capable of running across various platforms and devices
  • Programmers interested in exploring the low-level aspects of heterogeneous programming and optimizing code performance

Number of participants


Price per participant

Upcoming Courses

Related Categories