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.
1718 Discussions

OpenCL code distribution

caosun
New Contributor I
1,253 Views

Hello,

    I have succesfully developed a opencl program on my PC, which has Intel Opencl 2.0 SDK installed.

    Now I want to run this program on another PC, so I copy the .exe file to another PC without Intel OpenCL SDK installed. It failed to work. Then I copy the opencl.dll with the .exe from my PC, it also failed. And then I copy all the DLL file in the SDK directory from my PC, it also failed.

Could you please let me know if I miss any thing?

How could I distribute my program with OpenCL to other PC without Intel OpenCL installed?

0 Kudos
15 Replies
Yuri_K_Intel
Employee
1,253 Views
Hi, OpenCL runtime package should be installed on the other machine. Please, download and install 'CPU Only driver' from http://software.intel.com/en-us/vcsource/tools/opencl-sdk. Thanks, Yuri
0 Kudos
Raistmer
Beginner
1,253 Views

Will this "CPU only driver" support Ivy Bridge GPU part too?

Does Intel have any plans to include OpenCL runtime (for GPU part) in their GPU driver (to not require to download whole SDK) as both ATi and NV done already ?

0 Kudos
caosun
New Contributor I
1,253 Views

I think it will be very inconvenient. We do not want to install OpenCL package on each computer when distributing our code.

As you know, for Intel IPP, MKL or TBB, we only need to package the DLL with our application.

So can Intel OpenCL provide similar way?

0 Kudos
Yuri_K_Intel
Employee
1,253 Views

Raistmer wrote:

Will this "CPU only driver" support Ivy Bridge GPU part too?

Does Intel have any plans to include OpenCL runtime (for GPU part) in their GPU driver (to not require to download whole SDK) as both ATi and NV done already ?

"CPU only driver" supports CPU only.

GPU support is a part of the driver already. And driver actually includes the "CPU only driver" also. In my previous post I assumed that a target machine probably is not SNB/IVB and so it doesn't have corresponding driver installed.

0 Kudos
Rami_J_Intel
Employee
1,253 Views

If you are using the CPU device only; and still failing; then it might be an issue with missing "Microsoft Visual C++* 2010 runtime libraries" installed on the other system?

0 Kudos
Yuri_K_Intel
Employee
1,253 Views

caosun wrote:

I think it will be very inconvenient. We do not want to install OpenCL package on each computer when distributing our code.

As you know, for Intel IPP, MKL or TBB, we only need to package the DLL with our application.

So can Intel OpenCL provide similar way?

Please, see my previous post also.

So, when you are distributing your OpenCL application to work on another computer it should have supported HW (CPU with SSE4.1 and higher, GPU - IVB or higher) and corresponding OpenCL runtime which comes either as a graphics driver (which includes CPU package also) or standalone "CPU only package".

OpenCL requires slightly more to function than a collection of DLLs. One such requirement is the ICD (Installable Client Driver) which allows openCL to work with different platforms/vendors. It is basically a DLL also and some registry records (on Windows).

0 Kudos
Evgeny_F_Intel
Employee
1,253 Views

Hi,

The OpenCL runtime is a platform component and should be installed with the appropriate installation packages.

If your system has Core 3rd generation, you can install Graphics driver package that includes both CPU and GPU devices. (http://www.intel.com/p/en_US/support/detect/graphics)

If you have older system, only CPU device is supported. You can install runtime binaries only, no need for full SDK. (http://registrationcenter.intel.com/irc_nas/2560/intel_sdk_for_ocl_applications_2012_runtime_setup.exe)

In case you insist to copy binaries, this is not recommended. But if still. Please link with intelocl.dll or update registry settings in order to enable OpenCL ICD (opencl.dll) to find Intel platform.

 

0 Kudos
caosun
New Contributor I
1,253 Views

In VS2010, I have already added opencl.lib in the link option. When I use dependency walker to find the dependency of my .exe file, I can find only OpenCL.dll in window system directory is used (No other dll files in Intel SDK directory, such as intelocl.dll, tbb.dll etc.). So I feel confused and my questions are:

1. How does my .exe file (build with opencl) relate to the .dll in Intel SDK directory?

2. How could I link with intelocl.dll?

Thank you.

0 Kudos
Chuck_De_Sylva
Beginner
1,253 Views

caosun,

What system are you trying to run this on? Keep in mind that our CPU only driver runs on SNB and IVB, while our GPU only driver runs only on IVB.

- Chuck

0 Kudos
caosun
New Contributor I
1,253 Views

Yes, I can run my OpenCL code on my IVB PC with Intel OpenCL SDK installed.

But now I want to make a distributed package, so that other IVB platform can run my program without installing Intel OpenCL SDK.

Could you please help me?

0 Kudos
caosun
New Contributor I
1,253 Views

Hi Evgeny Fiksman,

I found that the intelocl.lib does not exist after Intel SKD 1.5, that is, we can not link intelocl.dll directly after that version.

So could you please let me know the alternative way?

0 Kudos
Yuri_K_Intel
Employee
1,253 Views
Hi caosun, I will answer for Evgeny. Alternative way to link is explicit linking (http://msdn.microsoft.com/en-us/library/9yd93633%28v=vs.100%29.aspx), i.e. load intelocl.dll dynamic library and access it exported functions (basically the same as OpenCL.dll provides). But I guess it would be easier to use another way (also already suggested). Copy Intel OpenCL CPU runtime binaries to some folder. Modify PATH to include that folder (or actually 2 folders on 64-bit system - bin\x86, bin\x64) and update the registry settings for OpenCL ICD: [HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors] "intelocl.dll"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Khronos\OpenCL\Vendors] "intelocl.dll"=dword:00000000 To answer your question regarding why your application depends on OpenCL.dll only - this is the way ICD (Installable client driver) works. We link only with OpenCL.dll, it then looks in registry for different vendors/platforms and allows to switch between them. Thanks, Yuri
0 Kudos
caosun
New Contributor I
1,253 Views

Thank you, Yuri.

Your information is very helpful. I will have a try.

0 Kudos
caosun
New Contributor I
1,253 Views

Hi Yuri,

    Does Intel OpenCL support windows XP? (I think it does not.)

    So can your method (updating registry setting) be applied in windows XP?

Thank you.

Sun Cao

0 Kudos
Yuri_K_Intel
Employee
1,253 Views
Hi, Yes, Intel OpenCL SDK doesn't support Windows XP. So the only way to check if the above method will work on it or not is by trial and error. Thanks, Yuri
0 Kudos
Reply