ArmNN
 24.08
TosaMappings.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <Layer.hpp>
9 
10 #include <tosa_serialization_handler.h>
12 
13 using namespace armnn;
14 using namespace tosa;
15 
16 // Populates a tosa::TosaSerializationBasicBlock from constructing
17 // tosa::TosaSerializationOperator(s) and tosa::TosaSerializationTensor(s)
18 // based on the input armnn::LayerType and associated armnn::TensorInfos and armnn::Descriptor.
19 //
20 // If an armnn::LayerType does not have a TOSA mapping or the mapping is not implemented in ArmNN,
21 // an empty tosa::TosaSerializationBasicBlock() is returned with operator tosa::Op_UNKNOWN.
22 TosaSerializationBasicBlock* GetTosaMapping(const Layer* layer,
23  const LayerType type,
24  const std::vector<const TensorInfo*>& inputs,
25  const std::vector<const TensorInfo*>& outputs,
26  const BaseDescriptor& /*descriptor*/);
27 
28 // Function called in armnn::OptimizeSubgraphView() when access to armnn::Layer is available
29 // and there is an option to set TOSA basic block data from constant layer tensors available from the input layer.
30 TosaSerializationBasicBlock* GetTosaMappingFromLayer(const Layer* layer);
TosaCommonOperators.hpp
GetTosaMappingFromLayer
TosaSerializationBasicBlock * GetTosaMappingFromLayer(const Layer *layer)
Definition: TosaMappings.cpp:213
armnn::Layer
Definition: Layer.hpp:230
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition: 01_00_quick_start.dox:6
Layer.hpp
GetTosaMapping
TosaSerializationBasicBlock * GetTosaMapping(const Layer *layer, const LayerType type, const std::vector< const TensorInfo * > &inputs, const std::vector< const TensorInfo * > &outputs, const BaseDescriptor &)
Definition: TosaMappings.cpp:18
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491