AFAIK it works like this with ICD loader extension:
- ICD (installable client driver) = proprietary OpenCL implementation = OpenCL runtime; You can find it in files like amdocl.so/dll or IntelOpenCL.so/dll
- ICD loader (in OpenCL.dll/libOpenCL.so): for managing multiple ICDs in the same system
- It is linked with the OpenCL application and acts as a placeholder for the ICD.
- The application invokes the functions exported by the ICD loader's library. However the ICD loader just decides to which ICD to redirect to depending on the selected OpenCL platform.
- The ICD loader mechanism is necessary, because a vendor's OpenCL implementation usually just supports this vendor's hardware, but you might want to use multiple devices from different vendors in the same OpenCL application.
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?