Get in Touch
 Duration 28 hours

Course Outline

Introduction

  • Foundations of OpenCL
  • Comparative analysis: OpenCL vs. CUDA vs. SYCL
  • Overview of OpenCL features and architecture
  • Configuring the Development Environment

Getting Started

  • Initiating a new OpenCL project with Visual Studio Code
  • Navigating the project structure and files
  • Compiling and executing the program
  • Displaying output using printf and fprintf

OpenCL API

  • The role of the OpenCL API in host programs
  • Querying device information and capabilities via the OpenCL API
  • Creating contexts, command queues, buffers, kernels, and events using the OpenCL API
  • Enqueuing commands via the OpenCL API, including read, write, copy, map, unmap, execute, and wait
  • Managing errors and exceptions with the OpenCL API

OpenCL C

  • The function of OpenCL C in device programs
  • Writing device-executable kernels in OpenCL C to manipulate data
  • Utilizing OpenCL C data types, qualifiers, operators, and expressions
  • Leveraging OpenCL C built-in functions for mathematical, geometric, and relational tasks
  • Applying 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: global, local, constant, and private
  • Handling OpenCL memory objects: buffers, images, and pipes
  • Implementing OpenCL memory access modes: read-only, write-only, and read-write
  • Applying the OpenCL memory consistency model and synchronization mechanisms

OpenCL Execution Model

  • Comparing host and device execution models
  • Defining parallelism using OpenCL work-items, work-groups, and ND-ranges
  • Using OpenCL work-item functions like get_global_id, get_local_id, and get_group_id
  • Employing OpenCL work-group functions such as barrier, work_group_reduce, and work_group_scan
  • Utilizing OpenCL device functions including 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 with 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

  • Factors influencing OpenCL program performance
  • Enhancing arithmetic throughput with OpenCL vector data types and vectorization techniques
  • Reducing control overhead and improving locality through OpenCL loop unrolling and loop tiling
  • Optimizing memory access and bandwidth using OpenCL local memory and associated functions
  • Measuring and improving execution time and resource utilization via OpenCL profiling and specialized tools

Requirements

  • Familiarity with C/C++ language and fundamental parallel programming concepts
  • Basic understanding of computer architecture and memory hierarchy
  • Practical experience with command-line tools and code editors

Target Audience

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

Number of participants


Price per participant

Upcoming Courses

Related Categories