Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors compiling OpenCL ICD loader on linux

Trying to compile the test OpenCL ICD driver: http://www.khronos.org/registry/cl/specs/opencl-icd-1.2.11.0.tgz on Linux (ubuntu 12.04).

Building as per README:

wget http://www.khronos.org/registry/cl/specs/opencl-icd-1.2.11.0.tgz
tar xvf opencl-icd-1.2.11.0.tgz
cd icd/inc
mkdir CL
cd CL
cp /usr/include/CL/* .
cd ../..
make

But make throws errors such as:

In file included from icd.c:42:0:
icd_dispatch.h:105:5: error: unknown type name 'cl_device_partition_property'
icd_dispatch.h:111:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CL_API_SUFFIX__VERSION_1_2'
icd_dispatch.h:114:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CL_API_SUFFIX__VERSION_1_2'
icd_dispatch.h:177:5: error: unknown type name 'cl_image_desc'
...

Looks like cl_device_partition_property should be referencing the opencl header ~/icd/inc/CL/cl_ext.h, but isn't picking it up for some reason. Any suggestions?

like image 396
steve cook Avatar asked Apr 09 '26 19:04

steve cook


1 Answers

It looks like you are using OpenCL 1.1 headers, whereas the ICD you are building is for 1.2. The cl_device_partition_property and cl_image_desc types are defined in cl.h, but were only added in OpenCL 1.2.

You can download the OpenCL 1.2 header from the Khronos OpenCL Registry.

like image 135
jprice Avatar answered Apr 12 '26 08:04

jprice



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!