aboutsummaryrefslogtreecommitdiff
path: root/src/graph/backends/CL/CLDeviceBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph/backends/CL/CLDeviceBackend.cpp')
-rw-r--r--src/graph/backends/CL/CLDeviceBackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graph/backends/CL/CLDeviceBackend.cpp b/src/graph/backends/CL/CLDeviceBackend.cpp
index f8e22ca7a0..eafda98669 100644
--- a/src/graph/backends/CL/CLDeviceBackend.cpp
+++ b/src/graph/backends/CL/CLDeviceBackend.cpp
@@ -65,7 +65,7 @@ bool file_exists(const std::string &filename)
static detail::BackendRegistrar<CLDeviceBackend> CLDeviceBackend_registrar(Target::CL);
CLDeviceBackend::CLDeviceBackend()
- : _context_count(0), _tuner(), _gemm_heuristics(), _allocator(nullptr), _tuner_file()
+ : _context_count(0), _tuner(), _gemm_heuristics(), _allocator(nullptr), _tuner_file(), _backend_type(CLBackendType::Native)
{
}
@@ -87,7 +87,7 @@ void CLDeviceBackend::set_kernel_tuning_mode(CLTunerMode tuning_mode)
void CLDeviceBackend::initialize_backend()
{
// Setup Scheduler
- CLScheduler::get().default_init(&_tuner, &_gemm_heuristics);
+ CLScheduler::get().default_init(&_tuner, &_gemm_heuristics, _backend_type);
// Create allocator with new context
_allocator = std::make_unique<CLBufferAllocator>(nullptr /* legacy path for CLCoreRuntimeContext */);
}
@@ -108,6 +108,7 @@ void CLDeviceBackend::setup_backend_context(GraphContext &ctx)
_context_count++;
if(_context_count == 1)
{
+ _backend_type = ctx.config().backend_type;
initialize_backend();
}