PDA

View Full Version : Best Practice for multiple dll



clint3112
10-23-2012, 03:55 AM
Hello,

I've been working with openCL for some time now but this is the first time I get in trouble with this problem. I am programming for multiple hardeware setups on windows now an so I dont know what hardware is present.
Example:
I have a i7 and a Nvidia GPU. So i would like to use the computingpower of the GPU. Hopefully there is a dll in the system directory deliverd by nvidia not by intel so that i can use it. But what if it is the intel openCL.dll? Can i still use the GPU?
I dont think I am the first one asking for this problem but i could not find an answer yet. Would you first use DX to get the GPU props and deliver all openCL.dlls with your product so that you can use the nvidia opencl.dll when the gpu device is capable and load the intel dll if not?

Hope my problem is clear.

Regards,
clint3112

utnapishtim
10-24-2012, 01:23 AM
There's only one dll opencl.dll, but clGetPlatformIDs will return two platforms: one for NVIDIA and one for Intel.
You'll then have to query the devices for each platform and select the GPU ones.

clint3112
10-24-2012, 02:43 AM
Thanks for the answer.

But if i deliver my software to many users i don't know what hardware they are using. And most of these users don't know what a dll is so I have to deliver the dll with the product. Is it possible to deliver my openCL.dll from my nvidia card to an AMD pc and the user can still use it? Does the openCL.dll only works as an Interface to some functionality on the CPU/GPU that will work no matter what hardware is laying below it?

That would mean, the openCL.dll of Intel should be excactly the same as the one delivered by Nvidia and Ati.

notzed
10-24-2012, 05:58 AM
Thanks for the answer.

But if i deliver my software to many users i don't know what hardware they are using. And most of these users don't know what a dll is so I have to deliver the dll with the product. Is it possible to deliver my openCL.dll from my nvidia card to an AMD pc and the user can still use it? Does the openCL.dll only works as an Interface to some functionality on the CPU/GPU that will work no matter what hardware is laying below it?

That would mean, the openCL.dll of Intel should be excactly the same as the one delivered by Nvidia and Ati.

I'm sure this is in the manual somewhere ...

The opencl library IS exactly the same between all vendors - i believe khronos supplies it to them. But that is only a shell which discovers the installed drivers at run-time through a common mechanism all vendors use (icd). It doesn't implement anything itself.

It is up to your customers to install the correct drivers for their hardware, for a compatible graphics card it is already included in up to date drivers.