ArmNN
 24.02
SampleDynamicLayerSupport.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
9 
10 namespace sdb // sample dynamic backend
11 {
12 
14 {
15 public:
16  bool IsAdditionSupported(const armnn::TensorInfo& input0,
17  const armnn::TensorInfo& input1,
18  const armnn::TensorInfo& output,
19  armnn::Optional<std::string&> reasonIfUnsupported = armnn::EmptyOptional()) const;
20 
21  bool IsInputSupported(const armnn::TensorInfo& input,
22  armnn::Optional<std::string&> reasonIfUnsupported) const;
23 
24  bool IsOutputSupported(const armnn::TensorInfo& output,
25  armnn::Optional<std::string&> reasonIfUnsupported) const;
26 
27  bool IsLayerSupported(const armnn::LayerType& type,
28  const std::vector<armnn::TensorInfo>& infos,
29  const armnn::BaseDescriptor& descriptor,
30  const armnn::Optional<armnn::LstmInputParamsInfo>& lstmParamsInfo,
31  const armnn::Optional<armnn::QuantizedLstmInputParamsInfo>& quantizedLstmParamsInfo,
32  armnn::Optional<std::string&> reasonIfUnsupported = armnn::EmptyOptional()) const;
33 };
34 
35 } // namespace sdb
armnn::Optional
Definition: Optional.hpp:270
armnn::TensorInfo
Definition: Tensor.hpp:152
sdb
Definition: SampleDynamicAdditionWorkload.cpp:11
LayerSupportBase.hpp
armnn::EmptyOptional
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
armnn::BaseDescriptor
Base class for all descriptors.
Definition: Descriptors.hpp:22
sdb::SampleDynamicLayerSupport::IsLayerSupported
bool IsLayerSupported(const armnn::LayerType &type, const std::vector< armnn::TensorInfo > &infos, const armnn::BaseDescriptor &descriptor, const armnn::Optional< armnn::LstmInputParamsInfo > &lstmParamsInfo, const armnn::Optional< armnn::QuantizedLstmInputParamsInfo > &quantizedLstmParamsInfo, armnn::Optional< std::string & > reasonIfUnsupported=armnn::EmptyOptional()) const
Default implementation of the ILayerSupport interface, Backends should implement this as a switch sta...
Definition: SampleDynamicLayerSupport.cpp:15
sdb::SampleDynamicLayerSupport::IsInputSupported
bool IsInputSupported(const armnn::TensorInfo &input, armnn::Optional< std::string & > reasonIfUnsupported) const
Definition: SampleDynamicLayerSupport.cpp:40
sdb::SampleDynamicLayerSupport::IsAdditionSupported
bool IsAdditionSupported(const armnn::TensorInfo &input0, const armnn::TensorInfo &input1, const armnn::TensorInfo &output, armnn::Optional< std::string & > reasonIfUnsupported=armnn::EmptyOptional()) const
Definition: SampleDynamicLayerSupport.cpp:52
armnn::LayerType
LayerType
When adding a new layer, adapt also the LastLayer enum value in the enum class LayerType below.
Definition: Types.hpp:491
sdb::SampleDynamicLayerSupport
Definition: SampleDynamicLayerSupport.hpp:13
armnn::LayerSupportBase
Definition: LayerSupportBase.hpp:13
sdb::SampleDynamicLayerSupport::IsOutputSupported
bool IsOutputSupported(const armnn::TensorInfo &output, armnn::Optional< std::string & > reasonIfUnsupported) const
Definition: SampleDynamicLayerSupport.cpp:46