aboutsummaryrefslogtreecommitdiff
path: root/src/graph/backends/CL/CLDeviceBackend.cpp
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2019-09-24 11:03:47 +0100
committerPablo Marquez <pablo.tello@arm.com>2019-10-15 14:05:55 +0000
commitdb8485ac24135f17e9882c76196924435abc064f (patch)
treedfe4ff6a50012ac93c6b1cf3fb29c099a7592522 /src/graph/backends/CL/CLDeviceBackend.cpp
parenta046e164b96a8441b2fa14ef578f7db46a0e97da (diff)
downloadComputeLibrary-db8485ac24135f17e9882c76196924435abc064f.tar.gz
COMPMID-2205: CL runtime context.
CL Interfaces implemented. Concrete classes implemented. One test (ActivationLayer) ported to the new interface. Change-Id: I283808bec36ccfc2f13fe048c45cbbee698ce525 Signed-off-by: Pablo Tello <pablo.tello@arm.com> Reviewed-on: https://review.mlplatform.org/c/1998 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/backends/CL/CLDeviceBackend.cpp')
-rw-r--r--src/graph/backends/CL/CLDeviceBackend.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/graph/backends/CL/CLDeviceBackend.cpp b/src/graph/backends/CL/CLDeviceBackend.cpp
index ea3b6b801a..58c666c3cc 100644
--- a/src/graph/backends/CL/CLDeviceBackend.cpp
+++ b/src/graph/backends/CL/CLDeviceBackend.cpp
@@ -34,6 +34,7 @@
#include "arm_compute/graph/backends/CL/CLSubTensorHandle.h"
#include "arm_compute/graph/backends/CL/CLTensorHandle.h"
+#include "arm_compute/core/CL/CLCoreRuntimeContext.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/runtime/BlobLifetimeManager.h"
#include "arm_compute/runtime/CL/CLBufferAllocator.h"
@@ -64,7 +65,7 @@ bool file_exists(const std::string &filename)
static detail::BackendRegistrar<CLDeviceBackend> CLDeviceBackend_registrar(Target::CL);
CLDeviceBackend::CLDeviceBackend()
- : _context_count(0), _tuner(), _allocator(nullptr), _tuner_file()
+ : _context_count(0), _tuner(), _allocator(nullptr), _tuner_file(), _legacy_ctx()
{
}
@@ -91,9 +92,9 @@ void CLDeviceBackend::initialize_backend()
{
// Setup Scheduler
CLScheduler::get().default_init(&_tuner);
-
+ _legacy_ctx = support::cpp14::make_unique<CLCoreRuntimeContext>(nullptr, CLScheduler::get().context(), CLScheduler::get().queue());
// Create allocator with new context
- _allocator = support::cpp14::make_unique<CLBufferAllocator>();
+ _allocator = support::cpp14::make_unique<CLBufferAllocator>(_legacy_ctx.get());
}
void CLDeviceBackend::release_backend_context(GraphContext &ctx)