While getting started, I'm missing opencl headers on windows

#1

I downloaded ComputeCpp, installed, choose integration with vs2017 and opened the “ComputeCpp SYCL C++1.vcxproj” example, and I’m getting this error:
1>Target ComputeCpp C++:
1> In file included from main.cpp:15:
1> In file included from d:\ComputeCpp\include\CL/sycl.hpp:1:
1> In file included from d:\ComputeCpp\include\CL/…/SYCL/sycl.hpp:20:
1> In file included from d:\ComputeCpp\include\SYCL/sycl_builtins.h:27:
1> In file included from d:\ComputeCpp\include\SYCL/cpp_to_cl_cast.h:12:
1> In file included from d:\ComputeCpp\include\SYCL/deduce.h:25:
1> In file included from d:\ComputeCpp\include\SYCL/cl_types.h:23:
1> In file included from d:\ComputeCpp\include\SYCL/common.h:21:
1> d:\ComputeCpp\include\SYCL/include_opencl.h(26,10): fatal error : ‘CL/cl.h’ file not found

Because opencl in not installed. Now I what to install opencl, so after a little googleing, I see
https://software.intel.com/en-us/intel-opencl/download

where I can download the openCL SDK as part of " Intel® System Studio", so I have to register for that… it this the only way to get opencl on windows, I don’t think I want " Intel® System Studio", I just want openCL, right?

Greetings,

Jan

  • close to shaving a yak.

D:>ComputeCpp\bin\computecpp_info.exe


ComputeCpp Info (CE 1.1.0)

SYCL 1.2.1 revision 3


Device Info:

Discovered 3 devices matching:
platform :
device type :


Device 0:

Device is supported : NO - Device does not support SPIR
CL_DEVICE_NAME : Quadro P600
CL_DEVICE_VENDOR : NVIDIA Corporation
CL_DRIVER_VERSION : 416.78
CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU

Device 1:

Device is supported : UNTESTED - Device not tested on this OS
CL_DEVICE_NAME : Intel® UHD Graphics 630
CL_DEVICE_VENDOR : Intel® Corporation
CL_DRIVER_VERSION : 24.20.100.6287
CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU

Device 2:

Device is supported : UNTESTED - Device running untested driver
CL_DEVICE_NAME : Intel® Core™ i7-8750H CPU @ 2.20GHz
CL_DEVICE_VENDOR : Intel® Corporation
CL_DRIVER_VERSION : 7.6.0.716
CL_DEVICE_TYPE : CL_DEVICE_TYPE_CPU

If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
https://computecpp.codeplay.com/releases/v1.1.0/platform-support-notes


#2

meanwhile, just trying to install intel system studio anyway, system_studio_dl

oh, come on, all I wanted was a couple of opencl headers + libs…

#3

trying the online installer…

no luck… I guess I’ll have to wait to try Computecpp until tomorrow.

#4

Ok, different approach:

copy https://github.com/KhronosGroup/OpenCL-Headers/tree/master/CL into \ComputeCpp\include\CL

result: example now compiles!?
but fails to run…

Error: [ComputeCpp:RT0100] Failed to build program (<Build log for program 0000013F08BA6430 device 0 (size 65):
error : Binary format for key=‘0’, ident=’’ is not recognized

#5

Because I’m working from my laptop right now, I’ve changed:

//default_selector mySelector;
cpu_selector mySelector;

and now it runs on my host!

D:\>"C:\Users\Jan Wilmans\source\repos\ComputeCpp SYCL C++1\x64\Debug\ComputeCpp SYCL C++1.exe"
Success!

nice…

#6

Ok, so I’ve got this working when running on the CPU, but I’ve tested on three different GPUs, one of which was a NVIDIA K2000, and it always reports “device supported: NO - Device does not support SPIR”

Am I missing something or it is just my hardware is too old?

Greetings,

Jan

--------------------------------------------------------------------------------
Device 0:

  Device is supported                     : NO - Device does not support SPIR
  CL_DEVICE_NAME                          : Quadro P600
  CL_DEVICE_VENDOR                        : NVIDIA Corporation
  CL_DRIVER_VERSION                       : 416.78
  CL_DEVICE_TYPE                          : CL_DEVICE_TYPE_GPU
--------------------------------------------------------------------------------
Device 1:

  Device is supported                     : UNTESTED - Device not tested on this OS
  CL_DEVICE_NAME                          : Intel(R) UHD Graphics 630
  CL_DEVICE_VENDOR                        : Intel(R) Corporation
  CL_DRIVER_VERSION                       : 24.20.100.6287
  CL_DEVICE_TYPE                          : CL_DEVICE_TYPE_GPU
--------------------------------------------------------------------------------
Device 2:

  Device is supported                     : UNTESTED - Device running untested driver
  CL_DEVICE_NAME                          : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  CL_DEVICE_VENDOR                        : Intel(R) Corporation
  CL_DRIVER_VERSION                       : 7.6.0.716
  CL_DEVICE_TYPE                          : CL_DEVICE_TYPE_CPU

If you encounter problems when using any of these OpenCL devices, please consult
this website for known issues:
https://computecpp.codeplay.com/releases/v1.1.0/platform-support-notes

******************************************************************************** 
#7

Am I missing something or it is just my hardware is too old?

NVidia’s OpenCL drivers do not support SPIR or SPIR-V which is required for ComputeCpp. Instead you can compile your binaries to PTX instructions that can be understood by the hardware. There’s some instructions on how to do this here

#8

Ok, that makes sense, so what is good hardware to really get the most out of ComputeCpp?

#9

You’ll find information about supported hardware here but essentially any hardware that supports SPIR or SPIR-V will work with ComputeCpp, for example Intel GPUs. We also hold out hope that AMD drivers will support SPIR again, but AMD GPUs can be used with an older version of the drivers.

1 Like
#10

Unfortunately AMD started pursuing ROCm after not being able to penetrate the market with bare OpenCL. Intel on the other hand is all out for OpenCL/SYCL, so from a software POV, Intel is your best bet. With their 2020 dGPUs, they’ll have the best ecosystem for running SYCL apps.

I do hope too (alongside @rod) that AMD will up their game and get their OpenCL stack in shape again. ROCm is shaping up to be a nice stack, but it lacks Windows support, and the PAL-based Windows stack (aka Radeon Software) last supported SPIR in 18.2.3. If that supports your GPU at hand, you are in luck. My dev box has an RX580, packs quite a punch, but the HDMI sync is buggy and I would very much like to update.

Nvidia is likely to jump aboard the SPIR-V train once the more easily deployable OpenCL-Next hits the shelves (for more info, see this years, or last years IWOCL keynote slides). SPIR is somewhat hard to maintain, hence vendors holding their breath for SPIR-V atop non OpenCL 2.1 runtimes (which is handful to implement, for little benefit to many). Until then, you can start development with the experimental PTX back-end and run code full throttle when support hits.

1 Like