Results 1 to 9 of 9

Thread: Accesing both Amd/nVidia OpenCL

  1. #1
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Accesing both Amd/nVidia OpenCL

    Is it possible to access both OpenCL platform in one executable, with current AMD and nVidia implementation?

    I tried to use both OpenCL.dll, but in each case I only got the .dll provider platform.

    configuration:
    Vista 64
    nVidia gtx 275, 195.62
    intel core i7
    amd ati stream sdk 2 beta 4

  2. #2
    Member
    Join Date
    Sep 2009
    Posts
    35

    Re: Accesing both Amd/nVidia OpenCL

    Now that both nVidia and AMD implementation export clean undecorated (cdecl calling convention) functions, it could be possible with dynamic loading of wanted implementation library. Take a look at dynamic loading with dlopen on Linux, that is LoadLibrary on Windows. Don't know if anyone tried this by now.

  3. #3
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: Accesing both Amd/nVidia OpenCL

    Thanks.

    So I must dynamically load OpenCL_ati.dll and OpenCL_nvidia.dll, and implement a platform manager myself from the dll name...

    I was thinking OpenclCL implementation should manage it automatically ... (is GetplatformList useless? ).

  4. #4
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Accesing both Amd/nVidia OpenCL

    The whole platform layer needs to be worked out between the vendors for good interop. Until that's finished (and they all ship compatible versions) you're on your own. If you want interop today you should try Mac OS X as it natively supports AMD/Nvidia GPUs and Intel CPUs.

  5. #5
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: Accesing both Amd/nVidia OpenCL

    So it's just a matter of time.
    I can wait, I'm just testing what is/will be possible with OpenCL, and writting a c++ wrapper.

    I tried mac os X 10.6.2, and even if it support multiple device, there is only one platform (called "Apple").

    In fact I never see a host which support multiple platforms.

    thanks.

  6. #6
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Accesing both Amd/nVidia OpenCL

    The one platform on OS X supports all devices, so you do not need multiple platforms. If you have a machine with supported AMD and Nvidia GPUs you'll see two devices of type CL_DEVICE_TYPE_GPU and one CPU device.

  7. #7
    Senior Member
    Join Date
    Nov 2009
    Posts
    118

    Re: Accesing both Amd/nVidia OpenCL

    Yes you're right if the platform support all existing devices, there is no really use for multiple platforms.

    But we can imagine there will exists other devices that wont be supported by Apple platform, but only by the device provider implementation.
    For example an open source software implementation (for debugging purpose).

    So I hope Apple thought about managing multiple platforms .

  8. #8
    Junior Member
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    5

    Re: Accesing both Amd/nVidia OpenCL

    As for dynamically loading the OpenCL dll, I have implemented that in a "compiler" tool I recently posted on sourceforge: http://clcc.sourceforge.net

    The reason for this is that currently there seem to be some problems between the nVidia and AMD opencl import libraries on windows, which causes problems when you link with one but want to use the other.

    George
    George van Venrooij
    Organic Vectory B.V.
    http://www.organicvectory.com

    CLCC - OpenCL Kernel Compiler

  9. #9
    Member
    Join Date
    Nov 2009
    Location
    Scotland
    Posts
    72

    Re: Accesing both Amd/nVidia OpenCL

    Hi George,

    just to make sure I got it right:
    Does that mean you can compile your kernel for the NVidia CUDA architecture using the NVidia compiler, compile a kernel for your (Intel or AMD) CPU using the AMD compiler and then use the binaries in a single OpenCL program to run kernels on both CPU and NVidia GPU?

    How stable is your tool? Do you know if it works on Linux?

    Cheers
    Dominik

Similar Threads

  1. OpenCL without Nvidia or AMD?
    By Gamingdrake in forum OpenCL
    Replies: 5
    Last Post: 11-18-2011, 08:18 AM
  2. Replies: 2
    Last Post: 11-09-2009, 07:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •