IVGCVSW-5363 Add Unmap layer and Unmap workload
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Change-Id: Ie5ecfa67e4763d0c058905592fe2e2fd7315f85c
diff --git a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp
index 1078c2a..a8465b4 100644
--- a/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp
+++ b/src/backends/backendsCommon/test/IsLayerSupportedTestImpl.hpp
@@ -7,6 +7,7 @@
#include <Graph.hpp>
#include <backendsCommon/MapWorkload.hpp>
+#include <backendsCommon/UnmapWorkload.hpp>
#include <backendsCommon/WorkloadFactory.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
@@ -214,6 +215,22 @@
armnn::SplitterLayer* m_Layer;
};
+template<>
+struct DummyLayer<armnn::UnmapLayer, void>
+{
+ DummyLayer()
+ {
+ m_Layer = dummyGraph.AddLayer<armnn::UnmapLayer>("");
+ }
+
+ ~DummyLayer()
+ {
+ dummyGraph.EraseLayer(m_Layer);
+ }
+
+ armnn::UnmapLayer* m_Layer;
+};
+
template <typename ConvolutionLayerType>
struct DummyConvolutionLayer
{
@@ -628,7 +645,6 @@
DECLARE_LAYER_POLICY_2_PARAM(PreCompiled)
DECLARE_LAYER_POLICY_1_PARAM(Prelu)
-
DECLARE_LAYER_POLICY_2_PARAM(QLstm)
DECLARE_LAYER_POLICY_1_PARAM(QuantizedLstm)
@@ -665,6 +681,8 @@
DECLARE_LAYER_POLICY_2_PARAM(TransposeConvolution2d)
+DECLARE_LAYER_POLICY_MAP_PARAM(Unmap, void)
+
// Generic implementation to get the number of input slots for a given layer type;
template<armnn::LayerType Type>
@@ -798,6 +816,13 @@
return true;
}
+template<typename FactoryType, armnn::DataType DataType, armnn::LayerType Type>
+bool IsLayerSupportedTest(FactoryType *factory, Tag<armnn::LayerType::Unmap>)
+{
+ IgnoreUnused(factory);
+ return true;
+}
+
// Helper function to compute the next type in the LayerType enum.
constexpr armnn::LayerType NextType(armnn::LayerType type)
{