From 8edb16d884530e7f35d05983e1617c13d200bb91 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Tue, 1 Oct 2019 13:34:59 +0100 Subject: IVGCVSW-3737 Add support for converting DEPTH_TO_SPACE * Added ConvertDepthToSpace() to hal_1_0::HalPolicy and hal_1_2::HalPolicy * Implemented ConvertDepthToSpace() template inside ConversionUtils.hpp * Changed unsupported operation from DEPTH_TO_SPACE to HASHTABLE_LOOKUP in GenericLayerTests/GetSupportedOperations Signed-off-by: Aron Virginas-Tar Change-Id: I12bf73ea721e7b6d49cc4a76000b43a3f274c6f5 --- test/GenericLayerTests.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/GenericLayerTests.cpp b/test/GenericLayerTests.cpp index 3b11b726..3788e66a 100644 --- a/test/GenericLayerTests.cpp +++ b/test/GenericLayerTests.cpp @@ -122,16 +122,26 @@ BOOST_AUTO_TEST_CASE(GetSupportedOperations) V1_0::Model model3 = {}; - AddInputOperand(model3, hidl_vec{1, 1, 1, 8}); - AddIntOperand(model3, 2); - AddOutputOperand(model3, hidl_vec{1, 2, 2, 2}); + AddInputOperand(model3, + hidl_vec{1, 1, 3, 4}, + HalPolicy::OperandType::TENSOR_INT32); + AddInputOperand(model3, + hidl_vec{4}, + HalPolicy::OperandType::TENSOR_INT32); + AddInputOperand(model3, hidl_vec{1, 1, 3, 4}); + + AddOutputOperand(model3, hidl_vec{1, 1, 3, 4}); + AddOutputOperand(model3, + hidl_vec{1, 1, 3, 4}, + HalPolicy::OperandType::TENSOR_QUANT8_ASYMM, + 1.f / 225.f); model3.operations.resize(1); // Add unsupported operation, should return no error but we don't support it - model3.operations[0].type = HalPolicy::OperationType::DEPTH_TO_SPACE; - model3.operations[0].inputs = hidl_vec{0, 1}; - model3.operations[0].outputs = hidl_vec{2}; + model3.operations[0].type = HalPolicy::OperationType::HASHTABLE_LOOKUP; + model3.operations[0].inputs = hidl_vec{0, 1, 2}; + model3.operations[0].outputs = hidl_vec{3, 4}; driver->getSupportedOperations(model3, cb); BOOST_TEST((int)errorStatus == (int)ErrorStatus::NONE); -- cgit v1.2.1