Backend

Beignet Compiler

This code base contains the compiler part of the Beignet OpenCL stack. The compiler is responsible to take a OpenCL language string and to compile it into a binary that can be executed on Intel integrated GPUs.

Status

After two years development, beignet is mature now. It now supports all the OpenCL 1.2 mandatory features. Beignet get almost 100% pass rate with both OpenCV 3.0 test suite and the piglit opencl test suite. There are some performance tuning related items remained, see here for a (incomplete) lists of things to do.

Interface with the run-time

Even if the compiler makes a very liberal use of C++ (templates, variadic templates, macros), we really tried hard to make a very simple interface with the run-time. The interface is therefore a pure C99 interface and it is defined in src/backend/program.h.

The goal is to hide the complexity of the inner data structures and to enable simple run-time implementation using straightforward C99.

Note that the data structures are fully opaque: this allows us to use both the C++ simulator or the real Gen program in a relatively non-intrusive way.

Various environment variables

Environment variables are used all over the code. Most important ones are:

Implementation details

Several key decisions may use the hardware in an usual way. See the following documents for the technical details about the compiler implementation:

Ben Segovia.