aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-03-26 10:31:32 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-04-08 09:12:09 +0000
commit11d4918b2321d1e590124f44dd68e6cda223dbdc (patch)
tree059b20480d2e5e22604cb852e5cb12fc2bfb0afd /src/runtime/CL
parentf64d33619827ce6ec9af4566c4743834e521328e (diff)
downloadComputeLibrary-11d4918b2321d1e590124f44dd68e6cda223dbdc.tar.gz
COMPMID-3279: Create CLCompiler interface
Change-Id: Ic9dd5288d72a690651aa03d474f2bfd6e1ebe8b2 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2957 Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r--src/runtime/CL/CLRuntimeContext.cpp8
-rw-r--r--src/runtime/CL/functions/CLFloor.cpp7
2 files changed, 10 insertions, 5 deletions
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
@@ -30,8 +30,13 @@ 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<CLFloorKernel>();
- k->configure(input, output);
+ k->configure(compile_context, input, output);
_kernel = std::move(k);
}