diff options
author | Derek Lamberti <derek.lamberti@arm.com> | 2019-03-25 15:41:58 +0000 |
---|---|---|
committer | derek.lamberti <derek.lamberti@arm.com> | 2019-03-27 16:06:46 +0000 |
commit | a9cca6aa935b3e290181a05fdb2c5f5557a49c09 (patch) | |
tree | 60493eeada1357fa2334f7f952879561480e192f /include | |
parent | 045ea78ab73b1c88a38d3ecb501583a38161ca0e (diff) | |
download | armnn-a9cca6aa935b3e290181a05fdb2c5f5557a49c09.tar.gz |
IVGCVSW-2870 Support QuantizeLayer on frontend
Change-Id: I2014a8d801f1f222d27a80dddf4f188ddcb3a5c9
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 4 | ||||
-rw-r--r-- | include/armnn/ILayerVisitor.hpp | 6 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 5 | ||||
-rw-r--r-- | include/armnn/LayerVisitorBase.hpp | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index 7896a80a8f..76d9c10d7f 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -209,6 +209,10 @@ public: const PreCompiledDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsQuantizeSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsReshapeSupported(const TensorInfo& input, const ReshapeDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index ce09246d07..76027f6eed 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -281,6 +281,12 @@ public: const PadDescriptor& padDescriptor, const char* name = nullptr) = 0; + /// Function a quantize layer should call back to when its Accept(ILayerVisitor&) function is invoked. + /// @param layer - pointer to the layer which is calling back to this visit function. + /// @param name - Optional name for the layer. + virtual void VisitQuantizeLayer(const IConnectableLayer* layer, + const char* name = nullptr) = 0; + /// Function a strided slice layer should call back to when its Accept(ILayerVisitor&) function is invoked. /// @param layer - pointer to the layer which is calling back to this visit function. /// @param StridedSliceDescriptor - Parameters for the strided slice operation. diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index b61206fae1..7c1fbdbd49 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -353,6 +353,11 @@ public: virtual IConnectableLayer* AddPadLayer(const PadDescriptor& padDescriptor, const char* name = nullptr) = 0; + /// Add a quantize layer to the network + ///@param name - Optional name for the layer. + /// @return - Interface for configuring the layer. + virtual IConnectableLayer* AddQuantizeLayer(const char* name = nullptr) = 0; + /// Adds a strided slice layer to the network. /// @param StridedSliceDescriptor - Parameters for the strided slice operation. /// @param name - Optional name for the layer. diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp index 2c37a21786..d30005f0ed 100644 --- a/include/armnn/LayerVisitorBase.hpp +++ b/include/armnn/LayerVisitorBase.hpp @@ -151,6 +151,9 @@ public: const PadDescriptor&, const char*) override { DefaultPolicy::Apply(); } + void VisitQuantizeLayer(const IConnectableLayer*, + const char*) override { DefaultPolicy::Apply(); } + void VisitStridedSliceLayer(const IConnectableLayer*, const StridedSliceDescriptor&, const char*) override { DefaultPolicy::Apply(); } |