Skip to content

Building: OpenCL Support

Christopher Canel edited this page Sep 5, 2018 · 1 revision

Download the OpenCL 2.0 drivers from here.

OpenCL 2.0 requires a patched Linux 4.4 kernel. The patches are included in the OpenCL tarball you just downloaded. The tarball also includes a PDF with setup instructions that describe both how to patch the Linux kernel and how to install the libraries for Ubuntu 14.04. The instructions essentially work for 16.04 (or Linux Mint, which is based on Ubuntu), but you'll need to make the appropriate adjustments.

Patching the kernel

The PDF tells you to pull a clean 4.4 kernel from kernel.org. You can also patch the official Ubuntu kernel, but the patches won't apply cleanly. [I went through the rejects manually to fix things up and it worked. -kaminsky]

Installing the OpenCL libraries

The PDF tells you how to do this. The resulting libs are in /opt/intel. At this point, the OpenCL sample code here should work. The capabilities view compiles out of the box and runs, reporting support from the kernel, etc.

[To Do]

  • Compile Caffe with OpenCL support
  • Compile SAF with OpenCL support