How to compile and run open cl codes on intel i5 processors having intel hd 4000 gpu unit??? Open cl has been istalled in /opt/intel/opencl and versionis ubuntu 12.04. Any help would be of great help... Thanks
How to compile and run open cl codes on intel i5 processors having intel hd 4000 gpu unit??? Open cl has been istalled in /opt/intel/opencl and versionis ubuntu 12.04. Any help would be of great help... Thanks
First:
sudo apt-get install beignet opencl-headers
Add the beignet folder to your library search path:
Get a simple test binary:
Edit the makefile to look more like this:
There you go. OpenCL working-ish for the intel HD family of video cards...
./capsbasic
In order to compile you require a compiler such as gcc. You can download gcc from its repository. (choose the biggest version number for more C++11 feature).
$> sudo apt-get install gcc-4.7
After that you have to link your OpenCL library to the application you are compiling. Lets say the Host application (main.c) code and the kernel application (kernel.cl) code reside in a folder called test. You should do as following:
$test> gcc -I /opt/intel/include -L /opt/intel/lib/[x86 or x86_64]/ main.c -o a.out
It should take care of the compile. You should run the output as:
$test>./a.out
and take care of any runtime error you might get (including correcting the path to you kernel.cl etc).