ONE - On-device Neural Engine
Loading...
Searching...
No Matches
TensorManager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 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#ifndef __ONERT_BACKEND_ACL_NEON_TENSOR_MANAGER_H__
18#define __ONERT_BACKEND_ACL_NEON_TENSOR_MANAGER_H__
19
20#include <arm_compute/runtime/Allocator.h>
21#include <arm_compute/runtime/PoolManager.h>
22#include <arm_compute/runtime/OffsetLifetimeManager.h>
23#include <arm_compute/runtime/MemoryManagerOnDemand.h>
24#include <arm_compute/runtime/MemoryGroup.h>
25
26#include <AclMemoryManager.h>
29#include <AclTensorManager.h>
30
31#include "operand/NETensor.h"
32#include "operand/NESubTensor.h"
33
34#include "util/logging.h"
35
36namespace onert
37{
38namespace backend
39{
40namespace acl_neon
41{
42
45
47 operand::INETensor, operand::NETensor, operand::NESubTensor, ::arm_compute::MemoryManagerOnDemand,
48 ::arm_compute::PoolManager, ::arm_compute::OffsetLifetimeManager, ::arm_compute::Allocator,
49 ::arm_compute::MemoryGroup>;
50
52 ::arm_compute::MemoryManagerOnDemand, ::arm_compute::PoolManager,
53 ::arm_compute::OffsetLifetimeManager, ::arm_compute::Allocator>;
54
57
58inline TensorManager *createTensorManager(bool is_linear_executor)
59{
60 if (is_linear_executor)
61 {
62 VERBOSE(acl_neon_createTensorManager) << "AclTensorManager as Linear" << std::endl;
63 return new TensorManager(new MemoryManager(), new LinearMemoryManager(),
65 }
66 else
67 {
68 VERBOSE(acl_neon_createTensorManager) << "AclTensorManager" << std::endl;
69 return new TensorManager(new MemoryManager(), new MemoryManager(), new InternalBufferManager());
70 }
71}
72
73} // namespace acl_neon
74} // namespace backend
75} // namespace onert
76
77#endif // __ONERT_BACKEND_ACL_NEON_TENSOR_MANAGER_H__
class for InternalBufferManager which has arm_compute::IMemoryManager pointer
#define VERBOSE(name, lv)
Definition Log.h:71
acl_common::AclInternalBufferManager< ::arm_compute::MemoryManagerOnDemand, ::arm_compute::PoolManager, ::arm_compute::OffsetLifetimeManager, ::arm_compute::Allocator > InternalBufferManager
TensorManager * createTensorManager(bool is_linear_executor)
acl_common::AclTensorManager< acl_neon::operand::INETensor, operand::NETensor, operand::NESubTensor > TensorManager
acl_common::AclLinearMemoryManager< operand::INETensor, operand::NETensor, operand::NESubTensor, ::arm_compute::MemoryManagerOnDemand, ::arm_compute::PoolManager, ::arm_compute::OffsetLifetimeManager, ::arm_compute::Allocator, ::arm_compute::MemoryGroup > LinearMemoryManager
acl_common::AclMemoryManager< operand::INETensor, operand::NETensor, operand::NESubTensor > MemoryManager