diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/Descriptors.hpp | 18 | ||||
-rw-r--r-- | include/armnn/DescriptorsFwd.hpp | 1 | ||||
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 5 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 7 | ||||
-rw-r--r-- | include/armnn/LayerSupport.hpp | 8 |
5 files changed, 39 insertions, 0 deletions
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp index 5a7a647ee7..656afb1756 100644 --- a/include/armnn/Descriptors.hpp +++ b/include/armnn/Descriptors.hpp @@ -333,6 +333,24 @@ struct ReshapeDescriptor TensorShape m_TargetShape; }; +struct SpaceToBatchNdDescriptor +{ + SpaceToBatchNdDescriptor() + : m_DataLayout(DataLayout::NCHW) + {} + + SpaceToBatchNdDescriptor(const std::vector<unsigned int>& blockShape, + const std::vector<std::pair<unsigned int, unsigned int>>& padList) + : m_BlockShape(blockShape) + , m_PadList(padList) + , m_DataLayout(DataLayout::NCHW) + {} + + std::vector<unsigned int> m_BlockShape; + std::vector<std::pair<unsigned int, unsigned int>> m_PadList; + DataLayoutIndexed m_DataLayout; +}; + // temporary descriptor for Lstm struct LstmDescriptor { diff --git a/include/armnn/DescriptorsFwd.hpp b/include/armnn/DescriptorsFwd.hpp index 739c12056c..a2974d797d 100644 --- a/include/armnn/DescriptorsFwd.hpp +++ b/include/armnn/DescriptorsFwd.hpp @@ -20,6 +20,7 @@ struct MeanDescriptor; struct PadDescriptor; struct Pooling2dDescriptor; struct ReshapeDescriptor; +struct SpaceToBatchNdDescriptor; struct ResizeBilinearDescriptor; struct SoftmaxDescriptor; struct OriginsDescriptor; diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index d63c3a7063..0e7adff0af 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -161,6 +161,11 @@ public: virtual bool IsReshapeSupported(const TensorInfo& input, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; + virtual bool IsSpaceToBatchNdSupported(const TensorInfo& input, + const TensorInfo& output, + const SpaceToBatchNdDescriptor& descriptor, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; + virtual bool IsResizeBilinearSupported(const TensorInfo& input, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const; diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 7a809350cb..2cb8f28d87 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -252,6 +252,13 @@ public: virtual IConnectableLayer* AddReshapeLayer(const ReshapeDescriptor& reshapeDescriptor, const char* name = nullptr) = 0; + /// Adds a space to batch layer to the network. + /// @param spaceToBatchNdDescriptor - Parameters for the space to batch operation. + /// @param name - Optional name for the layer. + /// @return - Interface for configuring the layer. + virtual IConnectableLayer* AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor& spaceToBatchNdDescriptor, + const char* name = nullptr) = 0; + /// Adds a floor layer to the network. /// @param name - Optional name for the layer. /// @return - Interface for configuring the layer. diff --git a/include/armnn/LayerSupport.hpp b/include/armnn/LayerSupport.hpp index 281807cf79..eb6b5da7b9 100644 --- a/include/armnn/LayerSupport.hpp +++ b/include/armnn/LayerSupport.hpp @@ -196,6 +196,14 @@ bool IsSoftmaxSupported(const BackendId& backend, size_t reasonIfUnsupportedMaxLength = 1024); /// Deprecated in favor of IBackend and ILayerSupport interfaces +bool IsSpaceToBatchNdSupported(const BackendId& backend, + const TensorInfo& input, + const TensorInfo& output, + const SpaceToBatchNdDescriptor& descriptor, + char* reasonIfUnsupported = nullptr, + size_t reasonIfUnsupportedMaxLength = 1024); + +/// Deprecated in favor of IBackend and ILayerSupport interfaces bool IsSplitterSupported(const BackendId& backend, const TensorInfo& input, const ViewsDescriptor& descriptor, |