CL/cl.h not found error when compiling SYCL code

#1

The computecpp_info tool shows I have a supported device on my machine that can be used with ComputeCpp.

When I compile my application it returns an error “CL/cl.h not found”

#2

The computecpp_info tool calls OpenCL functions and matches the devices detected against a map of known drivers. It does not search for OpenCL headers.

This error is caused by the compiler being unable to find the OpenCL headers. Either the compiler needs to be pointed to the header file, or the header file is missing and needs to be imported to the machine. The OpenCL headers are included with an OpenCL SDK (such as the one from Intel) or can be found in the Khronos GitHub repository.

#3

So, is downloading either Ok, or do you need to decided based on something? For example, will the KhronosGroup OpenCl-Header also work for Intel? or do you need the Intel SDK in to support intel?

#4

You can clone that repo and use those headers. You’ll need to point your build command to the headers location. I.e. the location where the “CL” folder is.

#5

pff, you have an overly sensitive spam management system, its hard to post anything without triggering it.

#6

rod, btw, you did not answer my question :slight_smile: does it matter when I choose the opencl headers from KhronosGroup/OpenCL-Headers or from intel? does it effect the output?

#7

No, it won’t make any difference, they are the same files.

1 Like