OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1663 Discussions

OpenCL.lib missing clCreateProgramWithIL?

CFabe1
Beginner
481 Views

Hello,

I am currently testing out some OpenCL features using SPIR-V and the llvm Clang compiler. Currently I'm trying out the example Using SPIR for fun and profit with Intel OpenCL Code Builder and I'm running into problems when trying to run the built executable. I'm running on a windows 10 machine in visual studio 2017, my target device is an Intel i7 - 8700. I've already installed the Intel OpenCL code builder studio tools and have successfully run multiple OpenCL projects already. My build targets x64.

The above example builds just fine but when I go to run the executable an error dialog box appears stating: "The procedure entry point clCreateProgramWithIL could not be located in the dynamic link library" followed by the path to my executable. I opened the OpenCL.lib that I'm targeting in the project and can see that clCreateProgramWithIL is listed along with other entry points in the library. To further investigate using the program Dependency Walker I targeted the built executable and can see that the clCreateProgramWithIL is listed as an "Unresolved C Function" I've included a snippet of the program window below.

Is this something missing from the OpenCL.lib build from Intel? I've already run multiple OpenCL projects and haven't had any problems thus far. Any help would be extremely appreciated!

Thank you for your time!

0 Kudos
2 Replies
Sergey_I_Intel1
Employee
481 Views

Hello Faber,

 

It seems like OpenCL.lib on your machine doesn't support OpenCL 2.0.

For potential fix, you can download and install latest version of OpenCL SDK with ISS 2019 package.

What version of OpenCL SDK is installed on your machine? 

 

Best regards,

Sergey

Ben_A_Intel
Employee
481 Views

Hi Clayton,

From your error message:

when I go to run the executable an error dialog box appears stating: "The procedure entry point clCreateProgramWithIL could not be located in the dynamic link library" followed by the path to my executable.

It sounds like the issue is with your ICD loader DLL (OpenCL.dll) and not the lib you are linking with (OpenCL.lib).  Do you know where your ICD loader DLL is coming from?  I believe all of the Intel OpenCL implementations should be shipping an OpenCL 2.1 or newer ICD loader, which is what you'd need to use the clCreateProgramWithIL API.

The ICD loader DLL is usually in c:\windows\system32 and c:\windows\syswow64.  Can you check to see if your ICD loader DLL is there, and if it is, what version you have?  If it says it is an OpenCL 2.1 or newer DLL, can you check that it is is exporting the clCreateProgramWithIL API, using something like "dumpbin /exports"?

Reply