diff options
Diffstat (limited to 'src/runtime/CL/CLRuntimeContext.cpp')
-rw-r--r-- | src/runtime/CL/CLRuntimeContext.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/runtime/CL/CLRuntimeContext.cpp b/src/runtime/CL/CLRuntimeContext.cpp index 571e30931c..b426b8c304 100644 --- a/src/runtime/CL/CLRuntimeContext.cpp +++ b/src/runtime/CL/CLRuntimeContext.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -22,19 +22,21 @@ * SOFTWARE. */ #include "arm_compute/runtime/CL/CLRuntimeContext.h" + #include "arm_compute/core/Validate.h" #include "arm_compute/runtime/CL/CLHelpers.h" #include "arm_compute/runtime/CL/CLScheduler.h" -#include "support/MemorySupport.h" - namespace arm_compute { CLRuntimeContext::CLRuntimeContext() - : _gpu_owned_scheduler(support::cpp14::make_unique<CLScheduler>()), _gpu_scheduler(_gpu_owned_scheduler.get()), _symbols(), _core_context() + : _gpu_owned_scheduler(std::make_unique<CLScheduler>()), + _gpu_scheduler(_gpu_owned_scheduler.get()), + _symbols(), + _backend_type() { _symbols.load_default(); - auto ctx_dev_err = create_opencl_context_and_device(); + auto ctx_dev_err = create_opencl_context_and_device(_backend_type); ARM_COMPUTE_ERROR_ON_MSG(std::get<2>(ctx_dev_err) != CL_SUCCESS, "Failed to create OpenCL context"); auto ctx = std::get<0>(ctx_dev_err); auto dev = std::get<1>(ctx_dev_err); @@ -42,7 +44,6 @@ CLRuntimeContext::CLRuntimeContext() _gpu_owned_scheduler->init(ctx, queue, dev, &_tuner); const std::string cl_kernels_folder("./cl_kernels"); 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() @@ -50,11 +51,6 @@ CLKernelLibrary &CLRuntimeContext::kernel_library() return CLKernelLibrary::get(); } -CLCoreRuntimeContext *CLRuntimeContext::core_runtime_context() -{ - return &_core_context; -} - void CLRuntimeContext::set_gpu_scheduler(CLScheduler *scheduler) { ARM_COMPUTE_ERROR_ON_NULLPTR(scheduler); |