diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2024-03-08 15:55:32 +0000 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2024-03-11 10:02:27 +0000 |
commit | e77736fe4150648d2fd0649cf61c1bade928d69d (patch) | |
tree | 35478906643c1df8630d177685e05e2252e0d77e /tests | |
parent | 40af090c0e4d0196e8d3c14642f423f593fe96df (diff) | |
download | ComputeLibrary-e77736fe4150648d2fd0649cf61c1bade928d69d.tar.gz |
Set int8 test tolerance in FullyConnected to int8
Int8 data types should be compared with Int8 tolerances. Same holds for UInt8 as well. O/w the differences between reference and target can be larger than it is because of casting.
Resolves: COMPMID-6930
Change-Id: I4940d821b7fecc21cf6b167e161dffceb764b909
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11269
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: <felixjohnny.thomasmathibalan@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/validation/NEON/FullyConnectedLayer.cpp | 6 | ||||
-rw-r--r-- | tests/validation/fixtures/FullyConnectedLayerFixture.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/NEON/FullyConnectedLayer.cpp b/tests/validation/NEON/FullyConnectedLayer.cpp index 31db8f0f80..ee7e56227d 100644 --- a/tests/validation/NEON/FullyConnectedLayer.cpp +++ b/tests/validation/NEON/FullyConnectedLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021, 2023 Arm Limited. + * Copyright (c) 2017-2021, 2023-2024 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -487,7 +487,7 @@ FIXTURE_DATA_TEST_CASE(RunMixedDataLayoutWithActivation, NEFullyConnectedLayerQu make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)))) { // Validate output - validate(Accessor(_target), _reference, tolerance_qasymm8); + validate(Accessor(_target), _reference, tolerance_qasymm8_signed); } FIXTURE_DATA_TEST_CASE(RunWithActivation, NEFullyConnectedLayerQuantizedFixture<int8_t>, framework::DatasetMode::PRECOMMIT, combine(datasets::FullyConnectedLayerWithActivationDataset(), @@ -529,7 +529,7 @@ FIXTURE_DATA_TEST_CASE(RunMixedDataLayout, NEFullyConnectedLayerQuantizedMixedDa NoActivationFunctionDataset)) { // Validate output - validate(Accessor(_target), _reference, tolerance_qasymm8); + validate(Accessor(_target), _reference, tolerance_qasymm8_signed); } FIXTURE_DATA_TEST_CASE(RunDynamicWeights, NEFullyConnectedLayerDynamicWeightsFixture<int8_t>, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallFullyConnectedLayerDataset(), make("DataType", DataType::QASYMM8_SIGNED), diff --git a/tests/validation/fixtures/FullyConnectedLayerFixture.h b/tests/validation/fixtures/FullyConnectedLayerFixture.h index 05f20ac12b..344187868f 100644 --- a/tests/validation/fixtures/FullyConnectedLayerFixture.h +++ b/tests/validation/fixtures/FullyConnectedLayerFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2023 Arm Limited. + * Copyright (c) 2017-2024 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -414,7 +414,7 @@ private: void validate_with_tolerance(TensorType &target, SimpleTensor<int8_t> &ref) { - constexpr AbsoluteTolerance<uint32_t> tolerance_qasymm8_signed(1); + constexpr AbsoluteTolerance<int32_t> tolerance_qasymm8_signed(1); validate(AccessorType(target), ref, tolerance_qasymm8_signed); } |