11 #include <common/include/ProfilingGuid.hpp> 13 #include <unordered_map> 15 #include "ArmnnSchema_generated.h" 27 const std::vector<armnn::ConstTensor>& constants,
36 return m_flatBufferBuilder;
51 return m_serializedLayers;
54 flatbuffers::Offset<armnnSerializer::FeatureCompatibilityVersions>
GetVersionTable();
58 flatbuffers::Offset<armnnSerializer::LayerBase> CreateLayerBase(
63 void CreateAnyLayer(
const flatbuffers::Offset<void>& layer,
const armnnSerializer::Layer serializerLayer);
66 flatbuffers::Offset<armnnSerializer::ConstTensor> CreateConstTensorInfo(
70 flatbuffers::Offset<TensorInfo> CreateTensorInfo(
const armnn::TensorInfo& tensorInfo);
73 flatbuffers::Offset<flatbuffers::Vector<T>> CreateDataVector(
const void* memory,
unsigned int size);
79 std::vector<flatbuffers::Offset<armnnSerializer::InputSlot>> CreateInputSlots(
83 std::vector<flatbuffers::Offset<armnnSerializer::OutputSlot>> CreateOutputSlots(
87 flatbuffers::FlatBufferBuilder m_flatBufferBuilder;
90 std::vector<flatbuffers::Offset<armnnSerializer::AnyLayer>> m_serializedLayers;
93 std::vector<int> m_inputIds;
96 std::vector<int> m_outputIds;
99 std::unordered_map<LayerGuid, uint32_t > m_guidMap;
107 const char* name =
nullptr);
110 const char* name =
nullptr);
114 const char* name =
nullptr);
118 const char* name =
nullptr);
122 const char* name =
nullptr);
126 const std::vector<armnn::ConstTensor>& constants,
127 const char* name =
nullptr);
130 const char* name =
nullptr);
134 const char* name =
nullptr);
138 const char* name =
nullptr);
142 const char* name =
nullptr);
145 const std::vector<armnn::ConstTensor>& constants,
146 const char* name =
nullptr);
150 const char* name =
nullptr);
154 const char* name =
nullptr);
158 const char* name =
nullptr);
162 const char* name =
nullptr);
165 const char* name =
nullptr);
169 const std::vector<armnn::ConstTensor>& constants,
170 const char* name =
nullptr);
173 const char* name =
nullptr);
177 const char* name =
nullptr);
181 const char* name =
nullptr);
184 const char *name =
nullptr);
188 const char* name =
nullptr);
192 const char* name =
nullptr);
195 const char* name =
nullptr);
199 const char* name =
nullptr);
203 const char* name =
nullptr);
207 const char* name =
nullptr);
211 const char* name =
nullptr);
215 const char* name =
nullptr);
219 const std::vector<armnn::ConstTensor>& constants,
220 const char* name =
nullptr);
227 const char* name =
nullptr);
230 const char* name =
nullptr);
233 const char* name =
nullptr);
236 const char* name =
nullptr);
240 const char* name =
nullptr);
244 const char* name =
nullptr);
248 const char* name =
nullptr);
252 const char* name =
nullptr);
256 const char* name =
nullptr);
259 const char* name =
nullptr);
262 const char* name =
nullptr);
266 const std::vector<armnn::ConstTensor>& constants,
267 const char* name =
nullptr);
270 const std::vector<armnn::ConstTensor>& constants,
271 const char* name =
nullptr);
274 const char* name =
nullptr);
278 const char* name =
nullptr);
282 const char* name =
nullptr);
286 const char* name =
nullptr);
290 const char* name =
nullptr);
294 const char* name =
nullptr);
298 const char* name =
nullptr);
302 const char* name =
nullptr);
306 const char* name =
nullptr);
309 const char* name =
nullptr);
313 const char* name =
nullptr);
317 const char* name =
nullptr);
321 const char* name =
nullptr);
325 const char* name =
nullptr);
328 const char* name =
nullptr);
331 const char* name =
nullptr);
335 const std::vector<armnn::ConstTensor>& constants,
336 const char* =
nullptr);
340 const char* name =
nullptr);
344 const std::vector<armnn::ConstTensor>& constants,
345 const char* name =
nullptr);
363 bool SaveSerializedToStream(std::ostream& stream);
A ViewsDescriptor for the SplitterLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
flatbuffers::FlatBufferBuilder & GetFlatBufferBuilder()
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
A ReshapeDescriptor for the ReshapeLayer.
A ComparisonDescriptor for the ComparisonLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
Main network class which provides the interface for building up a neural network. ...
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
void ExecuteStrategy(const armnn::IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id) override
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
A ResizeDescriptor for the ResizeLayer.
Base class for all descriptors.
A StackDescriptor for the StackLayer.
A PadDescriptor for the PadLayer.
An LstmDescriptor for the LstmLayer.
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
A FullyConnectedDescriptor for the FullyConnectedLayer.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
A GatherDescriptor for the GatherLayer.
A StandInDescriptor for the StandIn layer.
A QLstmDescriptor for the QLstmLayer.
std::vector< int > & GetInputIds()
An ActivationDescriptor for the ActivationLayer.
A SliceDescriptor for the SliceLayer.
A Convolution3dDescriptor for the Convolution3dLayer.
A BatchMatMulDescriptor for the BatchMatMul operator.
A Pooling3dDescriptor for the Pooling3dLayer.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
arm::pipe::ProfilingGuid LayerGuid
Define LayerGuid type.
std::vector< int > & GetOutputIds()
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
A MeanDescriptor for the MeanLayer.
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
std::vector< flatbuffers::Offset< armnnSerializer::AnyLayer > > & GetSerializedLayers()
flatbuffers::Offset< armnnSerializer::FeatureCompatibilityVersions > GetVersionTable()
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
A ChannelShuffleDescriptor for the ChannelShuffle operator.
A SoftmaxDescriptor for the SoftmaxLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
A PermuteDescriptor for the PermuteLayer.
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below...