diff options
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); |