OpenCL code distribution

OpenCL code distribution

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?

16 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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

Bild des Benutzers Raistmer

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 ?

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?

Quote:

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.

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?

Quote:

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).

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.

 

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.

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

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?

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?

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

Thank you, Yuri.

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

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

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

Melden Sie sich an, um einen Kommentar zu hinterlassen.