OpenCL clGetPlatformIDs returning CL_PLATFORM_NOT_FOUND in multi-vendor environments
0 reputation · 23 Sept 2023, 05:15 UTC
OpenCL applications rely on the Installable Client Driver (ICD) loader to discover available platforms at runtime. In environments with a single hardware vendor, the loader typically identifies the platform without configuration. However, production environments often contain multiple GPUs or a mix of integrated and discrete graphics, which can introduce complexities in how the loader searches for .icd files.
When moving from a simplified local setup to a production system with multiple driver profiles, there is uncertainty regarding how the ICD loader prioritizes vendor files in the system path (such as /etc/OpenCL/vendors on Linux) and whether specific environment variables can override this discovery process to prevent initialization failures.
- What is the deterministic behavior of the ICD loader when multiple valid platform profiles are present?
- Which specific system configurations trigger a
CL_PLATFORM_NOT_FOUNDerror despite the presence of installed drivers?