Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top