ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Config.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// For CLKernelLibraryEx initialization
18#include "arm_compute/core/CL/CLHelpers.h"
19#include "arm_compute/core/CL/CLKernelLibrary.h"
21
22#include <util/ConfigSource.h>
23
24#include <arm_compute/runtime/CL/CLScheduler.h>
25
26#include "Config.h"
27
29{
30
32{
33 if (!arm_compute::opencl_is_available())
34 {
35 return false;
36 }
37 arm_compute::CLScheduler::get().default_init();
38 // NOTE CLKernelLibraryEx must use the same context as CLScheduler
39 // It did not check whether another device is available.
41 "./cl_kernels/", arm_compute::CLScheduler::get().context(), cl::Device::getDefault());
42
43 return true;
44}
45
46} // namespace onert::backend::acl_cl
This file is a cloned version of CLKernelLibrary.h in ACL. This file defines an interface for CLKerne...
void init(std::string kernel_path, cl::Context context, cl::Device device)
Initialise the kernel library.
static CLKernelLibraryEx & get()
Get the KernelLibrary singleton.
bool initialize() override
Initialize the backend. This is called as soon as the backend is loaded.
Definition Config.cc:31