aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/ConstTensorLayerVisitor.hpp
diff options
context:
space:
mode:
authorJames Conroy <james.conroy@arm.com>2020-03-20 08:49:33 +0000
committerJames Conroy <james.conroy@arm.com>2020-03-20 14:53:44 +0000
commit586a9aac99312eb9cb304cbbd18cec46b9158e23 (patch)
tree6d620eae6dcfb920ac04eae43424548dc602a1eb /src/armnn/test/ConstTensorLayerVisitor.hpp
parentc94d3f7107b84b586791aa096f8641e6efa18c90 (diff)
downloadarmnn-586a9aac99312eb9cb304cbbd18cec46b9158e23.tar.gz
IVGCVSW-4549 Add front end for new QLSTM layer
* Added new layer QLstm (Android R HAL 1.3) * Made necessary updates to APIs * Added unit tests * This layer is functionally equivalent to the original unquantized LSTM layer with some additonal quantization features added. Due to this, original LstmParams are used for this layer. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I5b7f2d2fb6e17e81573b41a31bc55f49ae79608f
Diffstat (limited to 'src/armnn/test/ConstTensorLayerVisitor.hpp')
-rw-r--r--src/armnn/test/ConstTensorLayerVisitor.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/armnn/test/ConstTensorLayerVisitor.hpp b/src/armnn/test/ConstTensorLayerVisitor.hpp
index 203c5fd91b..e423e0f6e3 100644
--- a/src/armnn/test/ConstTensorLayerVisitor.hpp
+++ b/src/armnn/test/ConstTensorLayerVisitor.hpp
@@ -221,6 +221,38 @@ private:
LstmInputParams m_InputParams;
};
+class TestQLstmLayerVisitor : public TestLayerVisitor
+{
+public:
+ explicit TestQLstmLayerVisitor(const QLstmDescriptor& descriptor,
+ const LstmInputParams& params,
+ const char* name = nullptr)
+ : TestLayerVisitor(name)
+ , m_Descriptor(descriptor)
+ , m_InputParams(params)
+ {}
+
+ void VisitQLstmLayer(const IConnectableLayer* layer,
+ const QLstmDescriptor& descriptor,
+ const LstmInputParams& params,
+ const char* name = nullptr)
+ {
+ CheckLayerPointer(layer);
+ CheckLayerName(name);
+ CheckDescriptor(descriptor);
+ CheckInputParameters(params);
+ }
+
+protected:
+ void CheckDescriptor(const QLstmDescriptor& descriptor);
+ void CheckInputParameters(const LstmInputParams& inputParams);
+ void CheckConstTensorPtrs(const std::string& name, const ConstTensor* expected, const ConstTensor* actual);
+
+private:
+ QLstmDescriptor m_Descriptor;
+ LstmInputParams m_InputParams;
+};
+
class TestQuantizedLstmLayerVisitor : public TestLayerVisitor
{