I am working with a custom library which requires OpenCL support. So, I need to build libOpenCL.so for my target Intel platform with Yocto build system. I am not aware if there is any OpenCL recipe available which can be integrated and compiled with Yocto for target Intel platform. I have installed OpenCL for Ubuntu PC and know how to do that, but cannot find any help for building the same with Yocto. Can someone please give some lead on this?
The OpenCL runtime can be built from the below source for Apollo Lake: https://github.com/intel/compute-runtime I don't see an existing Yocto package for it, I will have to create something in order to integrate it. From building the above source I did this:
- Follow the instructions at BUILD_Ubuntu.md.
- Download, build and install the below: gmmlib, intel-graphics-compiler, libva.git
- Follow instructions at:
$ git clone https://github.com/intel/compute-runtime neo
$ mkdir build
$ cd build
$ cmake -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release ../neo
$ make -j
nprocpackage $ sudo dpkg -i intel-opencl-*.x86_64-igdrcl.deb
Once the above is done, your OpenCL driver is installed and ready to be used. Now, you need to download, compile and install the below: https://github.com/OCL-dev/ocl-icd
Follow the below page: INSTALL