Deployment of opencl.dll

Discussion created by dfenner on Feb 9, 2010
Latest reply on Feb 9, 2010 by dfenner
Is there a best practice for deployment of opencl.dll?

Hi everyone,


I installed the Ati sdk as well as the corresponding nvidia sdk. The nvdia sdk installs the opencl.dll into a central path. The Ati sdk does - as far as I see - not install to a central path.

When I compile the opencl sample programs provided by the stream sdk nividia's dll gets loaded. The good news is that I get it to run with some trivial changes. Also, when ati's opencl.dll is in copied in the same directory as the executable, I can execute opencl code on the cpu device through  the ati dll.

So basically things work fine but depending on which dll is loaded I can only access the ati or the nvidia platform.  My question is now: Is there an elegant way to choose the desired platform at runtime?

Currently the only way I see would be to deploy the both dll's to the end user and than use LoadLibrary to explicitly choose one or the other platform, query the devices and make my choice then. This feel  rather awkward since it is bypassing the clGetPlatformIDs mechanism.


Am I missing something important here?