aboutsummaryrefslogtreecommitdiff
path: root/include/armnn
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn')
-rw-r--r--include/armnn/ILayerSupport.hpp4
-rw-r--r--include/armnn/ILayerVisitor.hpp6
-rw-r--r--include/armnn/INetwork.hpp5
-rw-r--r--include/armnn/LayerVisitorBase.hpp3
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__); }