OpenCL for Lua is available from a git repository:

git clone

In the repository, checkout the latest release version:

git checkout 1.2.0

If you have GnuPG, verify that the tag is signed by the following key:

git tag -v 1.2.0
Primary key fingerprint: 2997 6EC2 2BD1 EBBC CC77  F3A6 183B D5ED 3527 8611
     Subkey fingerprint: 983B F9D0 F02A 6014 0CEC  529F 767E 12A8 C92A 31CB

The module is accompanied by a test suite:


On OS X, you need to make the OpenCL library loadable by the dynamic linker:

ln -sf /System/Library/Frameworks/OpenCL.framework/OpenCL /usr/local/lib/libOpenCL.dylib


OpenCL for Lua is available from LuaRocks:

luarocks install --local opencl

You may wish to remove older versions before installing:

luarocks remove --local opencl

To use the module, set the Lua module path in your shell's startup file:

eval `luarocks path`

If the LuaRocks mirror is not available, install from the git repository above:

luarocks install --local rockspec/opencl-1.2.0-1.rockspec

To install the module directly from the git source, use:

luarocks make --local rockspec/opencl-1.2.0-1.rockspec

In this case you must manually git checkout the corresponding version beforehand.