commit 00cf0ab72be3c79acb1b4a8169ebc6c32142f88a
Author: Brice Goglin <Brice.Goglin@inria.fr>
Date:   Fri Oct 2 10:06:29 2020 +0200

    opencl: don't warn when clGetPlatformIds() returns -1001
    
    It seems to happen when the generic OpenCL is available (hence hwloc enables OpenCL)
    but there are no implementations underneath.
    This error code CL_PLATFORM_NOT_FOUND_KHR was added in OpenCL without any info.
    
    Thanks to Philippe Swartvagher for the report.
    
    Closes #425
    
    Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>

diff --git a/hwloc/topology-opencl.c b/hwloc/topology-opencl.c
index 1a29b7821..ee9e2497f 100644
--- a/hwloc/topology-opencl.c
+++ b/hwloc/topology-opencl.c
@@ -33,6 +33,9 @@
 /* Copyright (c) 2008-2018 The Khronos Group Inc. */
 #define HWLOC_CL_DEVICE_TYPE_CUSTOM (1<<4)
 
+/* Only supported since OpenCL 2.0 */
+/* Copyright (c) 2008-2013 The Khronos Group Inc. */
+#define HWLOC_CL_PLATFORM_NOT_FOUND_KHR -1001
 
 static int
 hwloc_opencl_discover(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
@@ -58,7 +61,7 @@ hwloc_opencl_discover(struct hwloc_backend *backend, struct hwloc_disc_status *d
 
   clret = clGetPlatformIDs(0, NULL, &nr_platforms);
   if (CL_SUCCESS != clret || !nr_platforms) {
-    if (CL_SUCCESS != clret && !hwloc_hide_errors()) {
+    if (CL_SUCCESS != clret && HWLOC_CL_PLATFORM_NOT_FOUND_KHR != clret && !hwloc_hide_errors()) {
       fprintf(stderr, "OpenCL: Failed to get number of platforms with clGetPlatformIDs(): %d\n", clret);
     }
     return -1;
