diff options
-rw-r--r-- | arm_compute/core/CL/CLTypes.h | 5 | ||||
-rw-r--r-- | src/core/CL/ICLKernel.cpp | 2 | ||||
-rw-r--r-- | src/runtime/CL/CLTuner.cpp | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/arm_compute/core/CL/CLTypes.h b/arm_compute/core/CL/CLTypes.h index cf11f6ecd7..05f9e2e119 100644 --- a/arm_compute/core/CL/CLTypes.h +++ b/arm_compute/core/CL/CLTypes.h @@ -24,8 +24,13 @@ #ifndef __ARM_COMPUTE_CL_TYPES_H__ #define __ARM_COMPUTE_CL_TYPES_H__ +#include <string> + namespace arm_compute { +/** Default string for the CLKernel configuration id */ +static const std::string default_config_id = "no_config_id"; + /** Available GPU Targets */ enum class GPUTarget { diff --git a/src/core/CL/ICLKernel.cpp b/src/core/CL/ICLKernel.cpp index 9663fd200f..1e04f00343 100644 --- a/src/core/CL/ICLKernel.cpp +++ b/src/core/CL/ICLKernel.cpp @@ -63,7 +63,7 @@ void arm_compute::enqueue(cl::CommandQueue &queue, ICLKernel &kernel, const Wind } ICLKernel::ICLKernel() - : _kernel(nullptr), _lws_hint(CLKernelLibrary::get().default_ndrange()), _target(GPUTarget::MIDGARD), _config_id("") + : _kernel(nullptr), _lws_hint(CLKernelLibrary::get().default_ndrange()), _target(GPUTarget::MIDGARD), _config_id(arm_compute::default_config_id) { } diff --git a/src/runtime/CL/CLTuner.cpp b/src/runtime/CL/CLTuner.cpp index f3300d3f83..7f5be86833 100644 --- a/src/runtime/CL/CLTuner.cpp +++ b/src/runtime/CL/CLTuner.cpp @@ -42,8 +42,8 @@ void CLTuner::tune_kernel(ICLKernel &kernel) // Get the configuration ID from the kernel const std::string &config_id = kernel.config_id(); - // Check if we need to find the Optimal LWS. If config_id is empty, the kernel does not require to be tuned - if(config_id != "") + // Check if we need to find the Optimal LWS. If config_id is equal to default_config_id, the kernel does not require to be tuned + if(config_id != arm_compute::default_config_id) { auto p = _lws_table.find(config_id); |