diff options
author | Finn Williams <Finn.Williams@arm.com> | 2020-06-10 15:53:46 +0100 |
---|---|---|
committer | Finn Williams <Finn.Williams@arm.com> | 2020-07-06 21:50:50 +0100 |
commit | 2605b236d103e1ba27069e0d668599042a4761af (patch) | |
tree | dc0a408acb5749a1f51544fd5857452377d05aab /include/armnn | |
parent | c5789ca2e432075e2c92e7e0d99139c5329280e6 (diff) | |
download | armnn-2605b236d103e1ba27069e0d668599042a4761af.tar.gz |
IVGCVSW-4624 Add a RANK Reference Implementation
* Add Rank front end
* Add Rank reference implementation
* Add Rank serialization support
* Add Scalar serialization support
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I06e4a468c2a84e79bae2e6c5348596bbbf853b4b
Diffstat (limited to 'include/armnn')
-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 889b811903..ed234fe4db 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -314,6 +314,10 @@ public: const QuantizedLstmInputParamsInfo& paramsInfo, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsRankSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsReshapeSupported(const TensorInfo& input, const TensorInfo& output, const ReshapeDescriptor& descriptor, diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index 9b3998db9a..385ad62225 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -395,6 +395,12 @@ public: const QuantizedLstmInputParams& params, const char* name = nullptr) = 0; + /// Function a rank 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 VisitRankLayer(const IConnectableLayer* layer, + const char* name = nullptr) = 0; + /// Function a reshape 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 reshapeDescriptor - Parameters for the reshape operation. diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 8e7a4437c8..c0c52f974a 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -352,6 +352,11 @@ public: const ConstTensor& gamma, const char* name = nullptr) = 0; + /// Adds a rank layer to the network. + /// @param name - Optional name for the layer. + /// @return - Interface for configuring the layer. + virtual IConnectableLayer* AddRankLayer(const char* name = nullptr) = 0; + /// Adds a resize bilinear layer to the network. /// @param resizeDesc - Parameters for the resize operation. /// @param name - Optional name for the layer. diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp index 93ba7fe287..75237a4372 100644 --- a/include/armnn/LayerVisitorBase.hpp +++ b/include/armnn/LayerVisitorBase.hpp @@ -201,6 +201,9 @@ public: const QuantizedLstmInputParams&, const char*) override { DefaultPolicy::Apply(__func__); } + void VisitRankLayer(const IConnectableLayer*, + const char*) override { DefaultPolicy::Apply(__func__); } + void VisitReshapeLayer(const IConnectableLayer*, const ReshapeDescriptor&, const char*) override { DefaultPolicy::Apply(__func__); } |