aboutsummaryrefslogtreecommitdiff
path: root/src/backends/neon/test
diff options
context:
space:
mode:
authorJames Conroy <james.conroy@arm.com>2020-05-12 18:08:52 +0100
committerJames Conroy <james.conroy@arm.com>2020-05-20 13:09:45 +0100
commitcc34093a57ea486e48f9aa66fc8b98a7bbdefef1 (patch)
tree9c4d792e8c52b20fe8541108377d2b314c2232bd /src/backends/neon/test
parent36eed46563a2a254e674865eb8ede62a1558c997 (diff)
downloadarmnn-cc34093a57ea486e48f9aa66fc8b98a7bbdefef1.tar.gz
IVGCVSW-4451 Add QLstm NEON workload
* Adds QLstm workload. * Adds CreateWorkload and Layer tests. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I585eb2691395ee4ccd45b5a853660f90fc5cc821
Diffstat (limited to 'src/backends/neon/test')
-rw-r--r--src/backends/neon/test/NeonCreateWorkloadTests.cpp27
-rw-r--r--src/backends/neon/test/NeonLayerTests.cpp4
2 files changed, 31 insertions, 0 deletions
diff --git a/src/backends/neon/test/NeonCreateWorkloadTests.cpp b/src/backends/neon/test/NeonCreateWorkloadTests.cpp
index 0af9bf3e0d..73491c7810 100644
--- a/src/backends/neon/test/NeonCreateWorkloadTests.cpp
+++ b/src/backends/neon/test/NeonCreateWorkloadTests.cpp
@@ -967,4 +967,31 @@ BOOST_AUTO_TEST_CASE(CreateQuantizedLstmWorkload)
NeonCreateQuantizedLstmWorkloadTest<NeonQuantizedLstmWorkload>();
}
+template <typename QLstmWorkloadType>
+static void NeonCreateQLstmWorkloadTest()
+{
+ Graph graph;
+ NeonWorkloadFactory factory = NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
+
+ auto workload = CreateQLstmWorkloadTest<QLstmWorkloadType>(factory, graph);
+ QLstmQueueDescriptor queueDescriptor = workload->GetData();
+
+ IAclTensorHandle* inputHandle = PolymorphicDowncast<IAclTensorHandle*>(queueDescriptor.m_Inputs[0]);
+ BOOST_TEST((inputHandle->GetShape() == TensorShape({2, 4})));
+ BOOST_TEST((inputHandle->GetDataType() == arm_compute::DataType::QASYMM8_SIGNED));
+
+ IAclTensorHandle* cellStateOutHandle = PolymorphicDowncast<IAclTensorHandle*>(queueDescriptor.m_Outputs[1]);
+ BOOST_TEST((cellStateOutHandle->GetShape() == TensorShape({2, 4})));
+ BOOST_TEST((cellStateOutHandle->GetDataType() == arm_compute::DataType::QSYMM16));
+
+ IAclTensorHandle* outputHandle = PolymorphicDowncast<IAclTensorHandle*>(queueDescriptor.m_Outputs[2]);
+ BOOST_TEST((outputHandle->GetShape() == TensorShape({2, 4})));
+ BOOST_TEST((outputHandle->GetDataType() == arm_compute::DataType::QASYMM8_SIGNED));
+}
+
+BOOST_AUTO_TEST_CASE(CreateQLstmWorkloadTest)
+{
+ NeonCreateQLstmWorkloadTest<NeonQLstmWorkload>();
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/backends/neon/test/NeonLayerTests.cpp b/src/backends/neon/test/NeonLayerTests.cpp
index f992bd61a1..e8f0f78bab 100644
--- a/src/backends/neon/test/NeonLayerTests.cpp
+++ b/src/backends/neon/test/NeonLayerTests.cpp
@@ -773,6 +773,10 @@ ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjection,
ARMNN_AUTO_TEST_CASE(LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNorm,
LstmLayerFloat32NoCifgWithPeepholeWithProjectionWithLayerNormTest)
+// QLstm
+ARMNN_AUTO_TEST_CASE(QLstm, QLstmTest)
+
+// QuantizedLstm
ARMNN_AUTO_TEST_CASE(QuantizedLstm, QuantizedLstmTest)
// Mean