Introducing the Graph API

In release 17.09 of the Arm Compute Library, we introduced the Graph API. This is an important feature to make life easier for developers, and anyone else benchmarking the library.

The Graph API’s primary function is to reduce the boilerplate code, but it can also reduce errors in your code and improve its readability. It is simple and easy-to-use, with a stream interface that is similar to other C++ objects.

At the current stage, the Graph API only supports the ML functions, such as convolution, fully connected, activation, pooling. To use the Graph API, you must compile the library with both Neon and OpenCL enabled by setting neon=1 and opencl=1.

Note: As Raspberry Pi does not have OpenCL, the Graph API will automatically fall back to using Neon. This is why you need to compile the Arm Compute Library with both Neon and OpenCL enabled.

In terms of building blocks, the Graph API represents the third computation block, together with core and runtime. In terms of hierarchy, the Graph API lies just above the runtime, which in turn lies above the core block as this image shows.

Block diagram showing computation blocks core, runtime, and graph

Previous Next