OpenCL Actors

Joseph Noir edited this page Jun 7, 2017 · 4 revisions

This module eases the usage of OpenCL with actors. An OpenCL-enabled actor requires an OpenCL kernel as its behavior and interprets received messages as arguments for the kernel call. After processing it returns the results as a message.

Get the Sources

It is easiest to check out all submodules at once.

git clone --recursive https://github.com/actor-framework/actor-framework.git

Alternatively, you can get CAF and the OpenCL submodule only.

git clone https://github.com/actor-framework/actor-framework.git
cd actor-framework
git submodule init libcaf_opencl
git submodule update libcaf_opencl

First Steps

libcaf_opencl will be build with CAF per default if the submodule is loaded. If you wann build CAF without OpenCL with the loaded submodule, use the option --no-opencl of the configure script.

./configure
make
make install [as root, optional]

Our tests include a

make test

Dependencies

In addition to the requirements of CAF you need the OpenCL framework. It comes preinstalled on (most) OS X machines. On Linux, libopencl can be acquired through the installation of the vendor drivers and the headers are often found in the repositories. We have experience using the Nivida drivers, which can be downloaded from their homepage and installed manually. The OpenCL module is not tested on Windows.

If you run into problems or have experience with GPUs of different vendors, feel free to share your experiences.

Examples

There are three examples included in the module. Two perform simple matrix multiplications, one is an exclusive scan composed of three OpenCL actors.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.