From a7db35648d77406b5b2956a0cb3aace15562563e Mon Sep 17 00:00:00 2001 From: Ramy Elgammal Date: Wed, 19 Apr 2023 18:49:44 +0100 Subject: Avoid printing error message for each not found OpenCl library - Only print can't load any opencl library if none of "libOpenCL.so", "libGLES_mali.so", "libmali.so" are found. - If any of them is found, then no need to print any error message. Resolves: COMPMID-5973 Signed-off-by: Ramy Elgammal Change-Id: I9d62bd33545bbbf54d69836a4dca58a6294bc479 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/511804 Tested-by: bsgcomp Reviewed-by: Pablo Tello Comments-Addressed: bsgcomp Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9483 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- arm_compute/core/CL/OpenCL.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'arm_compute/core') diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h index 058214bd07..1e1f5291d9 100644 --- a/arm_compute/core/CL/OpenCL.h +++ b/arm_compute/core/CL/OpenCL.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Arm Limited. + * Copyright (c) 2016-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -73,15 +73,16 @@ public: * @return The static instance of CLSymbols. */ static CLSymbols &get(); - /** Load symbols from the given OpenCL library path. + /** This method attempts to load the OpenCL symbols from the first available library from the provided OpenCL libraries. * - * @param[in] library Path to the OpenCL library. - * @param[in] use_loader Use symbol loader function loadOpenCLPointer. + * @param[in] libraries_filenames Vector containing the filenames of the libraries to be loaded. + * @param[in] use_loader Use symbol loader function loadOpenCLPointer. * - * @return True if loading the library is successful. + * @return True if loading the library is successful. False if all the provided libraries could not be loaded. */ - bool load(const std::string &library, bool use_loader = false); + bool load(const std::vector &libraries_filenames, bool use_loader = false); /** Load symbols from any of the default OpenCL library names. + * If all the default libraries could not be loaded, this method will print a warning message and return false. * * @return True if loading any library is successful. */ -- cgit v1.2.1