ONE - On-device Neural Engine
Loading...
Searching...
No Matches
KernelGenerator.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_KERNEL_GENERATOR_H__
18#define __ONERT_BACKEND_ACL_NEON_KERNEL_GENERATOR_H__
19
21
22#include "ir/Operands.h"
23#include "TensorBuilder.h"
24#include "AclTensorRegistry.h"
25#include "TensorManager.h"
26
28{
29
31{
32public:
33 KernelGenerator(const ir::Graph &graph, const std::shared_ptr<TensorBuilder> &tensor_builder,
34 const std::shared_ptr<acl_common::AclTensorRegistry<TensorManager>> &_tensor_reg);
35
36 std::unique_ptr<exec::FunctionSequence> generate(ir::OperationIndex ind) override;
37
38private:
39#define OP(InternalName) void visit(const ir::operation::InternalName &) override;
40#include "Operation.lst"
41#undef OP
42
43private:
44 const ir::Operands &_ctx;
45 const ir::Operations &_operations_ctx;
46 std::shared_ptr<TensorBuilder> _tensor_builder;
47 std::shared_ptr<acl_common::AclTensorRegistry<TensorManager>> _tensor_reg;
48};
49
50} // namespace onert::backend::acl_neon
51
52#endif // __ONERT_BACKEND_ACL_NEON_KERNEL_GENERATOR_H__
Tensor registry class for acl backends.
std::unique_ptr< exec::FunctionSequence > generate(ir::OperationIndex ind) override