AFAIK it works like this with ICD loader extension:
As the ICD loader is just an optional OpenCL extension, I wonder how OpenCL works without the ICD loader. Of course, in this case you can not use multiple vendors' implementations in the same application at the same time, but what is used for linking the application? If the developer linked it against a specific implementation, then the main goal of OpenCL, portability, could not be reached anymore.
Or do the vendors have to provide dynamic libraries, that are compatible to each other? That means, if the developer linked to the dynamic library of vendor A, at runtime it would also work, if the target system has the dynamic library of vendor B installed?
Is that anywhere documented?
OpenCL defines an Installable Client Driver (ICD) mechanism to allow developers to build applications against an Installable Client Driver loader (ICD loader) rather than linking their applications against a specific OpenCL implementation. The ICD Loader is responsible for: Exporting OpenCL API entry points.
The OpenCL Installable Client Driver (ICD) is a mechanism to allow OpenCL implementations from. multiple vendors to coexist on a system. A vendor OpenCL implementation is an OpenCL Installable. Client Driver if it implements the extension cl_khr_icd, which is described in the OpenCL extension.
OpenCL ICD Bindings. OpenCL is a royalty-free standard for cross-platform, parallel programming of modern processors found in personal computers, servers and handheld/embedded devices. This package provides an Installable Client Driver Bindings (ICD Bindings).
For Windows OpenCL applications, your application includes OpenCL.h (or cl.h) and links to OpenCL.lib, which is a static library wrapper for OpenCL.dll which resides in the Windows System32 folder. You don't know if it is an ICD or a vendor driver. For the past many years it has been an ICD, but before that (for very early OpenCL implementations) it was a vendor driver. The beauty of the ICD is that the application does not need to know, you just call the OpenCL API. Only when it is an ICD will the number of platforms be greater than 1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With