From d275cb2fcb3b41928348a408f7eace4ff516ca8b Mon Sep 17 00:00:00 2001 From: David Monahan Date: Tue, 19 May 2020 14:58:34 +0100 Subject: IVGCVSW-IVGCVSW-4772 Fixes for android-nn-driver unit tests on Android R * Added missing operand parameter numberOfConsumers to DriverTestHelpers * Added nullptr checks to unit tests * Disabling QuantizedLstmTest when ARMCOMPUTECL_ENABLED is undefined Signed-off-by: David Monahan Change-Id: I46dc413d3bb1805eb0e7c982177b6d60d0b297f5 --- test/GenericLayerTests.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'test/GenericLayerTests.cpp') diff --git a/test/GenericLayerTests.cpp b/test/GenericLayerTests.cpp index 961ab166..188c7b1c 100644 --- a/test/GenericLayerTests.cpp +++ b/test/GenericLayerTests.cpp @@ -87,9 +87,19 @@ BOOST_AUTO_TEST_CASE(GetSupportedOperations) // Test Broadcast on add/mul operators HalPolicy::Model model2 = {}; - AddInputOperand(model2, hidl_vec{1, 1, 3, 4}); - AddInputOperand(model2, hidl_vec{4}); - AddIntOperand(model2, actValue); + AddInputOperand(model2, + hidl_vec{1, 1, 3, 4}, + HalPolicy::OperandType::TENSOR_FLOAT32, + 0.0f, + 0, + 2); + AddInputOperand(model2, + hidl_vec{4}, + HalPolicy::OperandType::TENSOR_FLOAT32, + 0.0f, + 0, + 2); + AddIntOperand(model2, actValue, 2); AddOutputOperand(model2, hidl_vec{1, 1, 3, 4}); AddOutputOperand(model2, hidl_vec{1, 1, 3, 4}); @@ -181,8 +191,16 @@ BOOST_AUTO_TEST_CASE(UnsupportedLayerContinueOnFailure) HalPolicy::OperandType::TENSOR_INT32); AddInputOperand(model, hidl_vec{4}, - HalPolicy::OperandType::TENSOR_INT32); - AddInputOperand(model, hidl_vec{1, 1, 3, 4}); + HalPolicy::OperandType::TENSOR_INT32, + 0.0f, + 0, + 2); + AddInputOperand(model, + hidl_vec{1, 1, 3, 4}, + HalPolicy::OperandType::TENSOR_FLOAT32, + 0.0f, + 0, + 2); AddOutputOperand(model, hidl_vec{1, 1, 3, 4}); AddOutputOperand(model, -- cgit v1.2.1