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