diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-01-10 14:44:13 +0000 |
---|---|---|
committer | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-01-15 09:18:45 +0000 |
commit | b66aa3b0f0fd81ae4eb383734045a55351776c7e (patch) | |
tree | ebd78202cc1bf6b8f1ab43abec133bf0ffde5477 /tests/validation | |
parent | cbbed288a71f2f048123db3cf396361e5d66ce93 (diff) | |
download | ComputeLibrary-b66aa3b0f0fd81ae4eb383734045a55351776c7e.tar.gz |
COMPMID-2759 add support for QASYMM8_SIGNED to CLFullyConnectedLayer
Change-Id: I7092390b01a56065a442be0d14e2f9bfce2cdc9c
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2583
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/CL/FullyConnectedLayer.cpp | 15 | ||||
-rw-r--r-- | tests/validation/fixtures/FullyConnectedLayerFixture.h | 3 |
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/validation/CL/FullyConnectedLayer.cpp b/tests/validation/CL/FullyConnectedLayer.cpp index 091d9411b7..e57dd4e7b1 100644 --- a/tests/validation/CL/FullyConnectedLayer.cpp +++ b/tests/validation/CL/FullyConnectedLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 ARM Limited. + * Copyright (c) 2017-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -57,6 +57,7 @@ const auto CNNDataTypes = framework::dataset::make("DataType", DataType::F16, DataType::F32, DataType::QASYMM8, + DataType::QASYMM8_SIGNED, }); const auto FullyConnectedParameters = combine(framework::dataset::make("TransposeWeights", { false, true }), framework::dataset::make("ReshapeWeights", { false, true })); @@ -222,8 +223,16 @@ FIXTURE_DATA_TEST_CASE(RunLarge, CLFullyConnectedLayerQuantizedFixture<uint8_t>, // Validate output validate(CLAccessor(_target), _reference, tolerance_qasymm8); } -TEST_SUITE_END() -TEST_SUITE_END() +TEST_SUITE_END() /* QASYMM8 */ +TEST_SUITE(QASYMM8_SIGNED) +FIXTURE_DATA_TEST_CASE(RunSmall, CLFullyConnectedLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, + combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), FullyConnectedParameters), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), QuantizationData)) +{ + // Validate output + validate(CLAccessor(_target), _reference, tolerance_qasymm8); +} +TEST_SUITE_END() /* QASYMM8_SIGNED */ +TEST_SUITE_END() /* Quantized */ TEST_SUITE_END() TEST_SUITE_END() diff --git a/tests/validation/fixtures/FullyConnectedLayerFixture.h b/tests/validation/fixtures/FullyConnectedLayerFixture.h index ff6ac17744..7f0ceadea1 100644 --- a/tests/validation/fixtures/FullyConnectedLayerFixture.h +++ b/tests/validation/fixtures/FullyConnectedLayerFixture.h @@ -49,7 +49,8 @@ template <typename TensorType, typename AccessorType, typename FunctionType, typ class FullyConnectedLayerValidationGenericFixture : public framework::Fixture { public: - using TBias = typename std::conditional < std::is_same<typename std::decay<T>::type, uint8_t>::value || std::is_same<typename std::decay<T>::type, int8_t>::value, int32_t, T >::type; + using TDecay = typename std::decay<T>::type; + using TBias = typename std::conditional < (std::is_same<TDecay, uint8_t>::value || std::is_same<TDecay, int8_t>::value), int32_t, T >::type; public: template <typename...> |