Results 1 to 4 of 4

Thread: Using ICD loader in open-source project

  1. #1
    Newbie
    Join Date
    Apr 2018
    Posts
    2

    Using ICD loader in open-source project

    Hello,
    I'm working on an open-source project that will use OpenCL. My goal would be that the user can just download the .exe and the opencl.dll will be supplied by the graphics driver. Or they can compile the application from source.
    But that requires opencl.lib and CL header files. These files are atleast according to my understanding distributed by vendor SDKs.
    Are those SDKs really needed? Because CL header files can be downloaded from Khronos and I have found a thing called ICD loader, also from Khronos, that generates both .lib and .dll files.

    Can I use this library instead of a SDK? I mean I got it working, but should I do it this way? My project would link against the .lib library from ICD but runtime would use .dll supplied by graphics driver?
    And what files can I distribute exactly, because licenses seem prety relaxed expect in ICD loader's there is a following paragraph that I do not fully understand:
    If the binary is used as part of an OpenCL(TM) implementation, whether binary
    is distributed together with or separately to that implementation, then
    recipient must become an OpenCL Adopter and follow the published OpenCL
    conformance process for that implementation, details at:
    **url that I cannot post on this forum**;
    What does the term implementation mean? I do not mean to 'implement' OpenCL, merely use it. Is this relevant only for vendors that want to implement better versions of .lib/.dll library for their SDKs? Because I do not plan on to distributing .lib nor .dll files. My project would contain my source files, CL headers, ICD loader sources and CMake files to build it together into working application.
    I do not plan on using any vendor-specific functions, just standard OpenCL 1.2, so is driver's .dll superset/compatible with ICD .lib? I would also like that my project be multi-platform which is another reason I do not want any SDKs. And last question, is there version of ICD that targets OpenCL 1.2? Because I had to supply CL 2.2 headers for it to compile and I don't plan on using those new functions. Or does it matter?

    Could somebody please help me answer my questions?

  2. #2
    Senior Member
    Join Date
    Apr 2015
    Posts
    321
    OpenCL.lib is the same for every OpenCL vendor. It is a simple library that searches for actual OpenCL dlls. You don't need to provide anything but your app binary. Also, OpenCL 2.2 is backwards compatible with older versions, so it's fine.
    Last edited by Salabar; 04-15-2018 at 11:06 AM.

  3. #3
    Newbie
    Join Date
    Apr 2018
    Posts
    2
    Thank you. And about that license, that paragraph is targeted to vendors? So I can redistribute ICD source code?(With the licence file of course)

  4. #4
    Senior Member
    Join Date
    Apr 2015
    Posts
    321
    I'm not too keen on legal aspects, but probably yes. Is this code the same for Windows, Linux and MacOS though?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean