diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-10-01 13:34:59 +0100 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2019-10-02 10:01:14 +0000 |
commit | 8edb16d884530e7f35d05983e1617c13d200bb91 (patch) | |
tree | 2eaceaac47e6dcbc7702d79e6131337ce8832ea0 /test/GenericLayerTests.cpp | |
parent | 09a42255247ace7b317b869cf7d5747aca85d6ef (diff) | |
download | android-nn-driver-8edb16d884530e7f35d05983e1617c13d200bb91.tar.gz |
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 <Aron.Virginas-Tar@arm.com>
Change-Id: I12bf73ea721e7b6d49cc4a76000b43a3f274c6f5
Diffstat (limited to 'test/GenericLayerTests.cpp')
-rw-r--r-- | test/GenericLayerTests.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
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<HalPolicy>(model3, hidl_vec<uint32_t>{1, 1, 1, 8}); - AddIntOperand<HalPolicy>(model3, 2); - AddOutputOperand<HalPolicy>(model3, hidl_vec<uint32_t>{1, 2, 2, 2}); + AddInputOperand<HalPolicy>(model3, + hidl_vec<uint32_t>{1, 1, 3, 4}, + HalPolicy::OperandType::TENSOR_INT32); + AddInputOperand<HalPolicy>(model3, + hidl_vec<uint32_t>{4}, + HalPolicy::OperandType::TENSOR_INT32); + AddInputOperand<HalPolicy>(model3, hidl_vec<uint32_t>{1, 1, 3, 4}); + + AddOutputOperand<HalPolicy>(model3, hidl_vec<uint32_t>{1, 1, 3, 4}); + AddOutputOperand<HalPolicy>(model3, + hidl_vec<uint32_t>{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<uint32_t>{0, 1}; - model3.operations[0].outputs = hidl_vec<uint32_t>{2}; + model3.operations[0].type = HalPolicy::OperationType::HASHTABLE_LOOKUP; + model3.operations[0].inputs = hidl_vec<uint32_t>{0, 1, 2}; + model3.operations[0].outputs = hidl_vec<uint32_t>{3, 4}; driver->getSupportedOperations(model3, cb); BOOST_TEST((int)errorStatus == (int)ErrorStatus::NONE); |