From bb8d7591a35bd95480b39001f8b7e41a6671f3a6 Mon Sep 17 00:00:00 2001 From: Tracy Narine Date: Thu, 13 Jul 2023 16:50:54 +0100 Subject: IVGCVSW-7879 Change REVERSE_V2 from LayerWithParameters with 1 input, to Layer with 2 inputs * Changing ReverseV2 to use two inputs * This is required by the backends * The ReverseV2Descriptor was removed * Tests updated * Added a Run<> templatefor inputs with different data types Signed-off-by: Tracy Narine Change-Id: I22f947de829b4b3da6bda3a74f4ffdef4052cc25 --- include/armnn/BackendHelper.hpp | 4 ++-- include/armnn/Descriptors.hpp | 24 ------------------------ include/armnn/DescriptorsFwd.hpp | 1 - include/armnn/INetwork.hpp | 4 +--- include/armnn/backends/WorkloadData.hpp | 2 +- 5 files changed, 4 insertions(+), 31 deletions(-) (limited to 'include/armnn') diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp index 6f804cbbed..6181ba5c40 100644 --- a/include/armnn/BackendHelper.hpp +++ b/include/armnn/BackendHelper.hpp @@ -360,9 +360,9 @@ public: const ResizeDescriptor& descriptor, Optional reasonIfUnsupported = EmptyOptional()); - bool IsReverseV2Supported(const TensorInfo& input, + bool IsReverseV2Supported(const TensorInfo& input0, + const TensorInfo& input1, const TensorInfo& output, - const ReverseV2Descriptor& descriptor, Optional reasonIfUnsupported = EmptyOptional()); bool IsShapeSupported(const TensorInfo& input, diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp index 27ca50123f..9ff894f1b0 100644 --- a/include/armnn/Descriptors.hpp +++ b/include/armnn/Descriptors.hpp @@ -1620,28 +1620,4 @@ struct BatchMatMulDescriptor : BaseDescriptor const TensorShape& tensorShape); }; -struct ReverseV2Descriptor : BaseDescriptor -{ - ReverseV2Descriptor() - : m_Axis() - , m_MaxDimension(4) - {} - - ReverseV2Descriptor(std::vector axis) - : m_Axis(axis) - , m_MaxDimension(4) - {} - - bool operator ==(const ReverseV2Descriptor& rhs) const - { - return m_Axis == rhs.m_Axis; - } - - /// The indices of the dimensions to reverse - std::vector m_Axis; - /// The max dimension supported in the lower levels of code - uint32_t m_MaxDimension; - -}; - } // namespace armnn diff --git a/include/armnn/DescriptorsFwd.hpp b/include/armnn/DescriptorsFwd.hpp index 4e9621d020..2c25a49f00 100644 --- a/include/armnn/DescriptorsFwd.hpp +++ b/include/armnn/DescriptorsFwd.hpp @@ -42,7 +42,6 @@ struct QLstmDescriptor; struct ReshapeDescriptor; struct ResizeDescriptor; struct ReduceDescriptor; -struct ReverseV2Descriptor; struct SliceDescriptor; struct SoftmaxDescriptor; struct SpaceToBatchNdDescriptor; diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index e311fa8840..e20dd1c348 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -838,11 +838,9 @@ public: const char* name = nullptr); /// Add a ReverseV2 layer to the network - /// @param descriptor - Parameters for the ReverseV2 operation /// @param name - Optional name for the layer /// @return - Interface for configuring the layer - IConnectableLayer* AddReverseV2Layer(const ReverseV2Descriptor& descriptor, - const char* name = nullptr); + IConnectableLayer* AddReverseV2Layer(const char* name = nullptr); void ExecuteStrategy(IStrategy& strategy) const; diff --git a/include/armnn/backends/WorkloadData.hpp b/include/armnn/backends/WorkloadData.hpp index fe59fca795..e7d5e0e689 100644 --- a/include/armnn/backends/WorkloadData.hpp +++ b/include/armnn/backends/WorkloadData.hpp @@ -750,7 +750,7 @@ struct BatchMatMulQueueDescriptor : QueueDescriptorWithParameters +struct ReverseV2QueueDescriptor : QueueDescriptor { void Validate(const WorkloadInfo& workloadInfo) const; }; -- cgit v1.2.1