IVGCVSW-3470 Add Quantized_LSTM tests
* Added Layer and Create Workload tests
for the new Quantized LSTM layer.
* Tests to be enabled on NEON and CL in
their respective patches.
Signed-off-by: James Conroy <james.conroy@arm.com>
Change-Id: I7e9e9768dd63010ab58367c45fffcff452377cfb
diff --git a/src/backends/backendsCommon/test/LayerTests.cpp b/src/backends/backendsCommon/test/LayerTests.cpp
index 4606380..f431216 100644
--- a/src/backends/backendsCommon/test/LayerTests.cpp
+++ b/src/backends/backendsCommon/test/LayerTests.cpp
@@ -2410,6 +2410,22 @@
workloadFactory, memoryManager, input, expectedOutput, qScale, qOffset, datatype);
}
+// QuantizedLstm
+LayerTestResult<uint8_t, 2> QuantizedLstmTest(
+ armnn::IWorkloadFactory& workloadFactory,
+ const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
+{
+ armnn::TensorInfo inputDesc({2, 2}, armnn::DataType::QuantisedAsymm8);
+ boost::multi_array<uint8_t, 2> input = MakeTensor<uint8_t, 2>(inputDesc, std::vector<uint8_t>(
+ {166, 179, 50, 150}));
+
+ armnn::TensorInfo outputDesc({2, 4}, armnn::DataType::QuantisedAsymm8);
+ boost::multi_array<uint8_t, 2> expectedOutput = MakeTensor<uint8_t, 2>(outputDesc, std::vector<uint8_t>(
+ {140, 151, 146, 112, 136, 156, 142, 112 }));
+
+ return QuantizedLstmTestImpl(workloadFactory, memoryManager, input, expectedOutput);
+}
+
LayerTestResult<float,3> ConcatTest(
armnn::IWorkloadFactory& workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager)
@@ -10710,4 +10726,4 @@
memoryManager,
false,
armnn::DataLayout::NHWC);
-}
+}
\ No newline at end of file