2 Replies Latest reply on Feb 9, 2010 11:43 AM by dfenner

    Deployment of opencl.dll

    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?

       

      Thanks

       Daniel

        • Deployment of opencl.dll
          genaganna

           

          Originally posted by: dfenner 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?

           

           



          You are right. presently we don't have a common dll/os which contain all platforms on system.

            • Deployment of opencl.dll
              dfenner

               

              You are right. presently we don't have a common dll/os which contain all platforms on system.

               

               

              Ok, this is a little bit weird since portablity is (at least for me) the big plus of opencl.

              Do you know how people handle this issue? The way I outlined above should work but still feels awkward.

              Also I'm not sure if it is a good idea to deploy the opencl.dll with the software. Since it interacts with the driver a lot it might be necessary to replace it when future versions of Catalyst/GeForce Driver come out (I guess?!).

              Thanks for your reply

               Daniel

               

               

              Edit: At least I'm not alone:

              http://forums.amd.com/devforum/messageview.cfm?catid=390&threadid=124208