From 11d4918b2321d1e590124f44dd68e6cda223dbdc Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 26 Mar 2020 10:31:32 +0000 Subject: COMPMID-3279: Create CLCompiler interface Change-Id: Ic9dd5288d72a690651aa03d474f2bfd6e1ebe8b2 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2957 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Georgios Pinitas Reviewed-by: Gian Marco Iodice --- src/runtime/CL/CLRuntimeContext.cpp | 8 ++++---- src/runtime/CL/functions/CLFloor.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL') diff --git a/src/runtime/CL/CLRuntimeContext.cpp b/src/runtime/CL/CLRuntimeContext.cpp index 49e4c10c84..4d70edac2f 100644 --- a/src/runtime/CL/CLRuntimeContext.cpp +++ b/src/runtime/CL/CLRuntimeContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 ARM Limited. + * Copyright (c) 2019-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -39,13 +39,13 @@ CLRuntimeContext::CLRuntimeContext() cl::CommandQueue queue = cl::CommandQueue(ctx, dev); _gpu_owned_scheduler->init(ctx, queue, dev, &_tuner); const std::string cl_kernels_folder("./cl_kernels"); - _kernel_lib.init(cl_kernels_folder, ctx, dev); - _core_context = CLCoreRuntimeContext(&_kernel_lib, _gpu_owned_scheduler->context(), _gpu_owned_scheduler->queue()); + CLKernelLibrary::get().init(cl_kernels_folder, ctx, dev); + _core_context = CLCoreRuntimeContext(&CLKernelLibrary::get(), _gpu_owned_scheduler->context(), _gpu_owned_scheduler->queue()); } CLKernelLibrary &CLRuntimeContext::kernel_library() { - return _kernel_lib; + return CLKernelLibrary::get(); } CLCoreRuntimeContext *CLRuntimeContext::core_runtime_context() diff --git a/src/runtime/CL/functions/CLFloor.cpp b/src/runtime/CL/functions/CLFloor.cpp index 525810d400..204ca7400c 100644 --- a/src/runtime/CL/functions/CLFloor.cpp +++ b/src/runtime/CL/functions/CLFloor.cpp @@ -29,9 +29,14 @@ namespace arm_compute { void CLFloor::configure(const ICLTensor *input, ICLTensor *output) +{ + configure(CLKernelLibrary::get().get_compile_context(), input, output); +} + +void CLFloor::configure(CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output) { auto k = arm_compute::support::cpp14::make_unique(); - k->configure(input, output); + k->configure(compile_context, input, output); _kernel = std::move(k); } -- cgit v1.2.1