Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Finding a general lib for OpenCL

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    Finding a general lib for OpenCL

    Hi, everyone. May I ask a silly question? Is there any general lib for OpenCL supporting all the hardware? Or is there any method to carry this out?

    In an other word, if I have a NV card, and I use NV's SDK for development, but when I copy the compiled program to a PC with ATi card, should I recompile my source code with ATi SDK? Or is there any general lib to use on both platform, making recompile avoidable?

    Thanks.

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

    Re: Finding a general lib for OpenCL

    The platform layer is supposed to make this possible, but my understanding is that it is not finished yet.

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    Re: Finding a general lib for OpenCL

    Quote Originally Posted by dbs2
    The platform layer is supposed to make this possible, but my understanding is that it is not finished yet.
    Could you tell me who is doing this for Windows? M$ doesn't seem to do this.

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

    Re: Finding a general lib for OpenCL

    If you search for OpenCL for windows I think you'll find a few vendors. I know AMD and Nvidia have one.

  5. #5
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    Re: Finding a general lib for OpenCL

    Quote Originally Posted by dbs2
    If you search for OpenCL for windows I think you'll find a few vendors. I know AMD and Nvidia have one.
    I know AMD and Nvdia both have their own SDKs and drivers for Windows, but I guess maybe one just cannot use AMD SDK for Nvdia driver(at least hardware acceleration is unavailable) on Windows, and vise versa.

    Am I right?

  6. #6
    Junior Member
    Join Date
    Oct 2009
    Posts
    15

    Re: Finding a general lib for OpenCL

    I think the OpenCL Driver is vendor-specific cause, ATI and Nvidia Cards are different and can't use the same OpenCL-driver, so every vendor has to build drivers supporting OpenCL.

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

    Re: Finding a general lib for OpenCL

    I have implemented a tool that loads the OpenCL dll at run-time, in theory making it independent of which actual driver it is used with. It is available with full source code at http://clcc.sourceforge.net if you would like to try it out.

    However, for the future I suspect the system vendors will provide a "common" OpenCL.dll (just like OpenGL) you can link to, which automatically passes calls through to the driver specific implementation.
    George van Venrooij
    Organic Vectory B.V.
    http://www.organicvectory.com

    CLCC - OpenCL Kernel Compiler

  8. #8
    Junior Member
    Join Date
    Nov 2009
    Posts
    6

    Re: Finding a general lib for OpenCL

    Quote Originally Posted by george_vv
    However, for the future I suspect the system vendors will provide a "common" OpenCL.dll (just like OpenGL) you can link to, which automatically passes calls through to the driver specific implementation.
    It seems a long time to wait this on Windows...
    It seems that I can only pin my hope on open source force.

  9. #9
    Junior Member
    Join Date
    Mar 2010
    Posts
    5

    Re: Finding a general lib for OpenCL

    Quote Originally Posted by lilei9110
    Hi, everyone. May I ask a silly question? Is there any general lib for OpenCL supporting all the hardware? Or is there any method to carry this out?

    In an other word, if I have a NV card, and I use NV's SDK for development, but when I copy the compiled program to a PC with ATi card, should I recompile my source code with ATi SDK? Or is there any general lib to use on both platform, making recompile avoidable?

    Thanks.
    That should be simply a matter of linking path, the header files are standard, and all the api calls are "EXTERN".
    NVIDIA drivers put libOpenCL.so (and OpenCL.dll) shared library in the system directory.
    ATI put the shared library in the SDK directory, you specify that path and than link with -lOpenCL flag.
    IBM kit for Cell put libCL.so in /usr/lib, so simply -lCL will works for linking.

    So if you want move your program compiled an PC A with a nvidia card, to PC B with ati card, simply you must have a library with the same name in the LD_PATH.

  10. #10
    Junior Member
    Join Date
    Apr 2010
    Posts
    6

    Re: Finding a general lib for OpenCL

    I have implemented a tool that loads the OpenCL dll at run-time, in theory making it independent of which actual driver it is used with. It is available with full source code at http://clcc.sourceforge.net if you would like to try it out.
    The solution of one DLL to communicate with every vendor's drivers is correct, like OpenGL32.dll itself.

    The question is who will create this DLL for every platform? Another open-source project? Maybe.

    My question: I write a commercial program with heavy parallel computations. OpenCL is manna from heaven for me. But I want to sell my program alone, without a specific GPU. My program must work with every hardware configuration (even GPU without OpenCL support) and primary on Windows, secondary on Linux.
    Is this possible, or I must use only CPU for now, and make an update with OpenCL support after 2, 5, 10 years?

Page 1 of 2 12 LastLast

Similar Threads

  1. OpenCL not finding devices as dll
    By randomdata in forum OpenCL
    Replies: 2
    Last Post: 02-04-2013, 12:26 PM
  2. Redistributing OpenCL.lib
    By eyebex in forum OpenCL
    Replies: 0
    Last Post: 01-25-2012, 03:56 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
  •