4
votes

I'm trying to use OpenCL on Linux using Intel Hardware:

I have 3 options:

  1. Use Intel's OpenCL on CPU implementation - gives me an opportunity to test the code logic as the performance behavior is very different.
  2. Use Intel's OpenCL on GPU implementation - but I never managed it to run as it requires custom build kernels and it isn't something want to deal with (do I miss something)
  3. Use Intel's Open Source OpenCL for GPU implementation - Beignet.

I tested Beignet 1.2.1 OpenCL on two major platforms:

  1. i5-6600 with IntelĀ® HD Graphics 530 - works OK but significantly slower than using same GPU under Windows with Intel OpenCL drivers.
  2. i5-3470 with IntelĀ® HD Graphics 2500 - works slowly as well but additionally creates huge graphic glitches immediately with stating any OpenCL program - basically preventing from me any use of GPU for OpenCL.

Also I compared it running same code on Windows OpenCL GPU implementation - and it works much faster.

The bigger difference I noticed in kernels doing quite standard and simple reduction using Local memory - it hits significant performance penalty (I read somewhere that beignet OpenCL using global memory as simulation for local one)


Question:

  1. Can anybody managed to use Beignet and get good performance from it?
  2. Can anybody managed to install Intel OpenCL drivers for GPU without compiling an entire kernel for it?
  3. Are there support mailing list/forums for Beignet (the mailing list I found was mostly related to patches)?
  4. Have anybody got the graphical glitches while using Beignet?
2

2 Answers

3
votes

Recently intel released their drivers as open source:

https://01.org/compute-runtime

I followed this build instructions on Ubuntu 16.04 (with exception of running make install instead of using deb file)

https://github.com/intel/compute-runtime/blob/master/documentation/BUILD_Ubuntu.md

And I got drivers working.

Performance was much better:

  • Caffe OpenCL got ~x2 performance in comparison to beignet
  • In my custom code reduction works much faster
  • The gemm operations using clblas, clblast also x2 faster

No custom kernel patches were needed

1
votes

Almost 1 year ago I faced similar dilemma - Beignet or Intel OpenCL drivers - and I ended up with Intel drivers.

I also started with Beignet first but I failed to install it successfully. However installation of Intel OpenCL went well on Ubuntu 14.04 and 16.04.

Ubuntu 14.04 required kernel patching but 16.04 worked without even though manual says it's required. I think you can do without kernel patching as long as your Linux distro kernel matches the one OpenCL driver requires and you don't need certain functionality that patching is required for. I think patching is needed for some OpenCL 2.0 functionality and I used OpenCL 1.2. On Ubuntu 16.04 default kernel version is 4.4 which matches the one the OpenCL driver require - specifically intel-opencl-2.0-2.0-54425 driver version. You can download it here if you need.

Otherwise the latest one currently requires kernel 4.7. If the Linux distro you use is on 4.7 then it may work without patching too.

I also tested Ubuntu vs Windows and I haven't noticed any performance difference. I used 54425 driver for OpenCL development on Ubuntu 16.04 for over half a year and I haven't seen any problems.