aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-05-21 16:33:48 +0100
committerKeith Davis <keith.davis@arm.com>2021-06-16 17:27:59 +0100
commit3ae3f978cf9ce3174609b7152af87acb410b0fe0 (patch)
tree9c71ea6aafbacfeba6938b5e0e29cdc97a784b70 /include
parent50de4fa4e7e0dd02a442ba350a1b40f293cb5a01 (diff)
downloadarmnn-3ae3f978cf9ce3174609b7152af87acb410b0fe0.tar.gz
MLCE-510 Add CpuRef Shape Operator to ArmNN
* Add front end * Add reference workload * Serialization/Deserialization * Add unit tests * Update ArmNN Versioning Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I6fcb1fa341d6f08dea4003b13544e6e9f53fefd3
Diffstat (limited to 'include')
-rw-r--r--include/armnn/BackendHelper.hpp4
-rw-r--r--include/armnn/DescriptorsFwd.hpp2
-rw-r--r--include/armnn/INetwork.hpp5
-rw-r--r--include/armnn/Types.hpp8
-rw-r--r--include/armnn/Version.hpp2
-rw-r--r--include/armnn/backends/ILayerSupport.hpp4
6 files changed, 20 insertions, 5 deletions
diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp
index 527d865694..093f822040 100644
--- a/include/armnn/BackendHelper.hpp
+++ b/include/armnn/BackendHelper.hpp
@@ -359,6 +359,10 @@ public:
const TensorInfo& output,
Optional<std::string&> reasonIfUnsupported = EmptyOptional());
+ bool IsShapeSupported(const TensorInfo& input,
+ const TensorInfo& output,
+ Optional<std::string&> reasonIfUnsupported = EmptyOptional());
+
bool IsSliceSupported(const TensorInfo& input,
const TensorInfo& output,
const SliceDescriptor& descriptor,
diff --git a/include/armnn/DescriptorsFwd.hpp b/include/armnn/DescriptorsFwd.hpp
index 4e7082e88f..9b22644c7b 100644
--- a/include/armnn/DescriptorsFwd.hpp
+++ b/include/armnn/DescriptorsFwd.hpp
@@ -38,10 +38,10 @@ struct ReshapeDescriptor;
struct ResizeBilinearDescriptor;
struct ResizeDescriptor;
struct ReduceDescriptor;
+struct SliceDescriptor;
struct SoftmaxDescriptor;
struct SpaceToBatchNdDescriptor;
struct SpaceToDepthDescriptor;
-struct SliceDescriptor;
struct StackDescriptor;
struct StandInDescriptor;
struct StridedSliceDescriptor;
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 8d94ed77f6..3c45262f1d 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -506,6 +506,11 @@ public:
IConnectableLayer* AddReshapeLayer(const ReshapeDescriptor& reshapeDescriptor,
const char* name = nullptr);
+ /// Adds a shape layer to the network.
+ /// @param name - Optional name for the layer.
+ /// @return - Interface for configuring the layer.
+ IConnectableLayer* AddShapeLayer(const char* name = nullptr);
+
/// Adds a space to batch layer to the network.
/// @param spaceToBatchNdDescriptor - Parameters for the space to batch operation.
/// @param name - Optional name for the layer.
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index ac4dd31999..e7c17608ca 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -332,7 +332,8 @@ using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
X(Addition) \
X(ArgMinMax) \
X(BatchNormalization) \
- X(BatchToSpaceNd) \
+ X(BatchToSpaceNd) \
+ X(Cast) \
X(Comparison) \
X(Concat) \
X(Constant) \
@@ -381,6 +382,7 @@ using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
X(Rank) \
X(Resize) \
X(Reduce) \
+ X(Shape) \
X(Slice) \
X(Softmax) \
X(SpaceToBatchNd) \
@@ -394,7 +396,7 @@ using InferenceTimingPair = std::pair<HighResolutionClock, HighResolutionClock>;
X(Transpose) \
X(TransposeConvolution2d) \
X(Unmap) \
- X(Cast)
+
/// When adding a new layer, adapt also the LastLayer enum value in the
/// enum class LayerType below
enum class LayerType
@@ -403,7 +405,7 @@ enum class LayerType
LIST_OF_LAYER_TYPE
#undef X
FirstLayer = Activation,
- LastLayer = Cast
+ LastLayer = Unmap
};
const char* GetLayerTypeAsCString(LayerType type);
diff --git a/include/armnn/Version.hpp b/include/armnn/Version.hpp
index 2139637b5b..5347097982 100644
--- a/include/armnn/Version.hpp
+++ b/include/armnn/Version.hpp
@@ -10,7 +10,7 @@
#define STRINGIFY_MACRO(s) #s
// ArmNN version components
-#define ARMNN_MAJOR_VERSION 25
+#define ARMNN_MAJOR_VERSION 26
#define ARMNN_MINOR_VERSION 0
#define ARMNN_PATCH_VERSION 0
diff --git a/include/armnn/backends/ILayerSupport.hpp b/include/armnn/backends/ILayerSupport.hpp
index 52b6df7117..462668d738 100644
--- a/include/armnn/backends/ILayerSupport.hpp
+++ b/include/armnn/backends/ILayerSupport.hpp
@@ -351,6 +351,10 @@ public:
const TensorInfo& output,
Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
+ virtual bool IsShapeSupported(const TensorInfo& input,
+ const TensorInfo& output,
+ Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0;
+
virtual bool IsSliceSupported(const TensorInfo& input,
const TensorInfo& output,
const SliceDescriptor& descriptor,