diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 4 | ||||
-rw-r--r-- | include/armnn/ILayerVisitor.hpp | 7 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 5 | ||||
-rw-r--r-- | include/armnn/LayerVisitorBase.hpp | 2 |
4 files changed, 18 insertions, 0 deletions
diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index 33f86dea59..c67569bf00 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -27,6 +27,10 @@ protected: virtual ~ILayerSupport() {} public: + virtual bool IsAbsSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsActivationSupported(const TensorInfo& input, const TensorInfo& output, const ActivationDescriptor& descriptor, diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index 1ccbf98d95..a22de878ca 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -20,6 +20,13 @@ protected: virtual ~ILayerVisitor() {} public: + /// Function an absolute 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 VisitAbsLayer(const IConnectableLayer* layer, + const char* name = nullptr) = 0; + /// Function that an activation 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 activationDescriptor - ActivationDescriptor to configure the activation. diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index a2ff0dc575..ce0fda2707 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -265,6 +265,11 @@ public: virtual IConnectableLayer* AddMergerLayer(const MergerDescriptor& mergerDescriptor, const char* name = nullptr) = 0; + /// Add absolute layer to the network. + /// @param name - Optional name for the layer. + /// @ return - Interface for configuring the layer. + virtual IConnectableLayer* AddAbsLayer(const char* name = nullptr) = 0; + /// Adds an addition layer to the network. /// @param name - Optional name for the layer. /// @return - Interface for configuring the layer. diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp index 8c5464c29e..363a09154d 100644 --- a/include/armnn/LayerVisitorBase.hpp +++ b/include/armnn/LayerVisitorBase.hpp @@ -29,6 +29,8 @@ protected: virtual ~LayerVisitorBase() {} public: + void VisitAbsLayer(const IConnectableLayer*, + const char*) override { DefaultPolicy::Apply(__func__); } void VisitActivationLayer(const IConnectableLayer*, const ActivationDescriptor&, |