aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2019-09-04 17:29:31 +0100
committerSadik Armagan <sadik.armagan@arm.com>2019-09-05 10:48:35 +0000
commit868eb14c463ee76668ad75d4cd4e718a840f7be6 (patch)
treea2eac7dd52811c2af188cc00c271d156afee008b /include
parent3a161988ebb9e5406d2bcab6fc3a06f8545eb588 (diff)
downloadarmnn-868eb14c463ee76668ad75d4cd4e718a840f7be6.tar.gz
IVGCVSW-3739 Add Arm NN front end support for Abs Layer
* Add Abs Layer * Add no-op factory implementations for CpuRef, CpuAcc, GpuAcc * Add Queue Descriptor in WorkloadData * Add IsAbsLayerSupported to LayerSupport * Add LayerVisitor tests Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ib0992571d1c80de851cea466291be904e9bdb430
Diffstat (limited to 'include')
-rw-r--r--include/armnn/ILayerSupport.hpp4
-rw-r--r--include/armnn/ILayerVisitor.hpp7
-rw-r--r--include/armnn/INetwork.hpp5
-rw-r--r--include/armnn/LayerVisitorBase.hpp2
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&,