Results 1 to 3 of 3

Thread: OpenCL On Multiple Platforms

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    25

    OpenCL On Multiple Platforms

    I'm slightly confused as to how OpenCL works under the hood.
    When I do `locate libOpenCL.so` I get multiple files; presumably one for each SDK I have install (NVIDIA, Intel and AMD).

    When I link my executables I don't think too much about what I'm doing, do I have to link depending on which platform I wish to target?

    What happens when I, for example, choose my Intel CPU platform but link the NVIDIA libOpenCL. Or is there a single lib that calls into the requisite libs for each SDK?

    Cheers.

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    271

    Re: OpenCL On Multiple Platforms

    I remember reading that libOpenCL is supplied by khronos, so it should be the same for all vendors.

    All it does is look up the icd files and then proxies the function calls to the implementation(s). So you only need to link against libopencl from any vendor, and the available platforms are discovered and instantiated at run-time.

    It's nothing to worry about, it 'just works'.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Posts
    25

    Re: OpenCL On Multiple Platforms

    Brilliant, thanks notzed. Thought it must have been something like that but didn't make sense to have multiple libOpenCL on my system (e.g. One in NVIDIA dir).

    Cheers.

Similar Threads

  1. OpenCL implementation for Multiple platforms
    By Gopal_HC in forum OpenCL
    Replies: 1
    Last Post: 04-05-2013, 02:14 AM
  2. Replies: 1
    Last Post: 08-20-2010, 11:19 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
  •