Best Practice for multiple dll

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

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.

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.