MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-SDK

github.com/KhronosGroup/OpenCL-SDK @v2026.05.29

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2026.05.29 ↗ · + Follow
454 symbols 1,022 edges 97 files 52 documented · 11% updated 13d agov2026.05.29 · 2026-06-01★ 76746 open issues

Browse by type

Functions 373 Types & classes 81
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenCLTM SDK (in development)

This is the Khronos OpenCL SDK. It brings together all the components needed to develop OpenCL applications:

  • OpenCL Headers (external/OpenCL-Headers/)
  • OpenCL C++ bindings (external/OpenCL-CLHPP/include)
  • OpenCL Loader (external/OpenCL-ICD-Loader)
  • OpenCL utility library (lib/include)

It also contains resources useful to OpenCL developers:

  • Code samples (samples/)
  • Documentation (docs/)

Build Instructions

Dependencies

  • This repository uses sub-modules for the OpenCL Headers, OpenCL C++ bindings, and OpenCL ICD Loader and some of their transitive dependencies.

  • To clone a new repository with all sub-modules included, use the --recursive option. Note that this option clones all sub-modules and their dependencies, which are not strictly required for the OpenCL SDK:

    git clone --recursive https://github.com/KhronosGroup/OpenCL-SDK.git
    
  • Alternatively, to clone only the sub-modules for the OpenCL SDK, first clone this repository without sub-modules included then setup submodules non-recursively:

    git clone https://github.com/KhronosGroup/OpenCL-SDK.git
    git submodule init
    git submodule update
    
  • The SDK uses CMake for its build system. If CMake is not provided by your build system or OS package manager, please consult the CMake website.

  • The SDK samples depend on

  • Templatized C++ Command Line Parser Library (aka. TCLAP)

  • Simple and Fast Multimedia Library (aka. SFML)
  • OpenGL Mathematics (aka. GLM)

Example Build

In most cases, the following steps may be used to build the OpenCL SDK.

  1. Clone this repo and update submodules:

    git clone https://github.com/KhronosGroup/OpenCL-SDK.git
    git submodule init
    git submodule update
    
  2. Create a "build" directory:

    mkdir build
    cd build
    
  3. Generate build files inside of the "build" directory:

    cmake .. -DCMAKE_BUILD_TYPE=Release
    
  4. Build the OpenCL SDK and copy files to an "install" directory:

    cmake --build . --target install --config Release
    

Or, build the OpenCL SDK using the generated build files directly.

To customize a build, the following CMake variables are supported. To specify one of these variables via the command line generator, use the CMake syntax -D<variable>=<value>. See your CMake documentation for more details.

Variable Type Description
CMAKE_BUILD_TYPE STRING Specifies the build type. Does not affect multi-configuration generators, such as Visual Studio solution files.
CMAKE_INSTALL_PREFIX PATH Install directory prefix.
OPENCL_SDK_BUILD_UTILITY_LIBRARIES BOOL Enables building OpenCL SDK utility libraries. Default: TRUE
OPENCL_SDK_BUILD_SAMPLES BOOL Enables building OpenCL SDK samples. Default: TRUE
OPENCL_SDK_BUILD_OPENGL_SAMPLES BOOL Enables building OpenCL SDK samples that interoperate with OpenGL. Default: FALSE
OPENCL_SDK_BUILD_VULKAN_SAMPLES BOOL Enables building OpenCL SDK samples that interoperate with Vulkan. Default: FALSE
OPENCL_SDK_TEST_SAMPLES BOOL Enables a target to test the OpenCL SDK samples. Default: TRUE

Core symbols most depended-on inside this repo

Shape

Function 286
Method 87
Class 80
Enum 1

Languages

C++67%
C27%
Python6%

Modules by API surface

lib/src/Extensions/src/openclext.cpp121 symbols
samples/core/blur/blur.cpp24 symbols
samples/core/blur/main.c22 symbols
samples/core/reduce/main.c14 symbols
samples/extensions/khr/nbody/main.cpp13 symbols
lib/src/Extensions/scripts/gen/__init__.py12 symbols
samples/extensions/khr/conway/main.cpp11 symbols
python/transpose.py11 symbols
samples/extensions/khr/externalmemory/vulkan_utils.h10 symbols
samples/extensions/khr/externalmemory/main.c10 symbols
samples/core/callback/main.c10 symbols
samples/extensions/khr/externalmemory/vulkan_utils.hpp9 symbols

For agents

$ claude mcp add OpenCL-SDK \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page