diff options
author | mathad01 <matthew.haddon@arm.com> | 2021-04-07 12:07:30 +0100 |
---|---|---|
committer | mathad01 <matthew.haddon@arm.com> | 2021-04-12 15:31:28 +0100 |
commit | b392e9845b7f40ab0c389f29f13f6ec84dd814d1 (patch) | |
tree | d71d260f7ff5ba7498ea653174bd166f27865ee5 /include | |
parent | 35ad91c489312c23dddac5e6dffde840fbb85b79 (diff) | |
download | armnn-b392e9845b7f40ab0c389f29f13f6ec84dd814d1.tar.gz |
IVGCVSW-5410 Add front-end support for CAST
IVGCVSW-5415 Add TfLiteParser support for CAST
* Added front end support for CAST, including support in the
Reference workload, Serialization, Deserializtion, Unit tests, and
TfLiteParser.
Signed-off-by: mathad01 <matthew.haddon@arm.com>
Change-Id: Iaf670ca5912a21ed6bc84f7f83a68b42154846bb
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/BackendHelper.hpp | 4 | ||||
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 4 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 5 | ||||
-rw-r--r-- | include/armnn/Types.hpp | 6 |
4 files changed, 16 insertions, 3 deletions
diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp index 41bb5f9c3a..2958980669 100644 --- a/include/armnn/BackendHelper.hpp +++ b/include/armnn/BackendHelper.hpp @@ -61,6 +61,10 @@ public: const BatchToSpaceNdDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()); + bool IsCastSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()); + bool IsComparisonSupported(const TensorInfo& input0, const TensorInfo& input1, const TensorInfo& output, diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index 602e4e5b57..52b6df7117 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -60,6 +60,10 @@ public: const BatchToSpaceNdDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsCastSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsComparisonSupported(const TensorInfo& input0, const TensorInfo& input1, const TensorInfo& output, diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 5d2b4edb00..2cdbe1a939 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -198,6 +198,11 @@ public: IConnectableLayer* AddArgMinMaxLayer(const ArgMinMaxDescriptor& desc, const char* name = nullptr); + /// Adds a cast layer to the network. + /// @param name - Optional name for the layer. + /// @return - Interface for configuring the layer. + IConnectableLayer* AddCastLayer(const char* name = nullptr); + /// Add a Comparison layer to the network. /// @param name - Optional name for the layer. /// @param desc - Descriptor for the comparison operation. diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp index 07d38a332d..2fd40b84dd 100644 --- a/include/armnn/Types.hpp +++ b/include/armnn/Types.hpp @@ -425,8 +425,8 @@ struct ProfilingStaticGuid : public ProfilingGuid X(Switch) \ X(Transpose) \ X(TransposeConvolution2d) \ - X(Unmap) - + X(Unmap) \ + X(Cast) /// When adding a new layer, adapt also the LastLayer enum value in the /// enum class LayerType below enum class LayerType @@ -435,7 +435,7 @@ enum class LayerType LIST_OF_LAYER_TYPE #undef X FirstLayer = Activation, - LastLayer = Unmap + LastLayer = Cast }; const char* GetLayerTypeAsCString(LayerType type); |