Following this and this posts, I'm compiling the main.c
code on this GitHub Gist.
Running CMake command find_package(OpenCL REQUIRED)
I get this:
-- Looking for CL_VERSION_2_2 - found -- Found OpenCL: C:/Program Files (x86)/IntelSWTools/system_studio_2020/OpenCL/sdk/lib/x86/OpenCL.lib (found version "2.2")
indicating that an OpenCL SDK version 2.2 was found. This is in contradiction with what I get from clinfo
tool, detecting a 1.2 OpenCL for Intel's SDK/platforms. Now when running the executable I get:
cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
My questions are:
- Why I get two different versions of OpenCL from CMake and
clinfo
? - What is the warning I'm getting at runtime and how to fix that?
P.S. Here is the output of cmake .. --debug-find