Skip to content

KhronosGroup/OpenCL-Layers

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
inc
 
 
 
 
 
 
 
 
 
 
 
 

OpenCL-Layers

A collection of OpenCL layers.

Building

The layers in this repository can be built using CMake:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make

Using a layer

Layers are loaded and enabled by the OpenCL-ICD-Loader so applications have to use the ICD loader to be able to use layers.

On a Unix-like system, a typical usage looks like the following (taking the example of the object lifetime layer):

OPENCL_LAYERS=/path/to/OpenCL-Layers/build/object-lifetime/libCLObjectLifetimeLayer.so \
/path/to/application

This assumes that the the OpenCL-ICD-Loader is already installed on the system and configured to point to available ICDs (i.e. OpenCL implementation shared libraries).

If this is not the case, please refer to the full OpenCL-ICD-Loader documentation for how to install and configure the loader.

The following should however be useful in many scenarios:

LD_LIBRARY_PATH=/path/to/OpenCL-ICD-Loader/build \
OCL_ICD_FILENAMES=/path/to/vendor/libOpenCL.so \
OPENCL_LAYERS=/path/to/OpenCL-Layers/build/object-lifetime/libCLObjectLifetimeLayer.so \
/path/to/application

Tutorial

A more in-depth tutorial can be found here: OpenCL-Layers-Tutorial

About

A collection of OpenCL layers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published