From 0fc25454b6ce499b7f89792f91b81a61a42d3182 Mon Sep 17 00:00:00 2001 From: Vidhya Sudhan Loganathan Date: Mon, 18 Jun 2018 14:40:56 +0100 Subject: COMPMID-970 : Remove QS8 / QS16 support Remove QS8 and QS16 validation and benchmark tests Change-Id: I566f1474c1fafcb3903115ec2d3a003d73e4c93b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/133762 Tested-by: Jenkins Reviewed-by: Pablo Tello --- tests/validation/CL/FullyConnectedLayer.cpp | 60 ++--------------------------- 1 file changed, 3 insertions(+), 57 deletions(-) (limited to 'tests/validation/CL/FullyConnectedLayer.cpp') diff --git a/tests/validation/CL/FullyConnectedLayer.cpp b/tests/validation/CL/FullyConnectedLayer.cpp index 7db9cf5b70..069d8a73ac 100644 --- a/tests/validation/CL/FullyConnectedLayer.cpp +++ b/tests/validation/CL/FullyConnectedLayer.cpp @@ -47,8 +47,6 @@ RelativeTolerance tolerance_f32(0.05f); RelativeTolerance tolerance_f16(half(0.2)); constexpr float tolerance_num = 0.07f; /**< Tolerance number */ -/** Tolerance for fixed point operations */ -constexpr AbsoluteTolerance tolerance_fixed_point(1.f); /** Tolerance for quantized asymmetric operations */ constexpr AbsoluteTolerance tolerance_qasymm8(1); @@ -57,8 +55,6 @@ const auto CNNDataTypes = framework::dataset::make("DataType", { DataType::F16, DataType::F32, - DataType::QS8, - DataType::QS16, DataType::QASYMM8, }); @@ -119,36 +115,32 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(frame // clang-format off DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip( framework::dataset::make("InputInfo", { TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), // Mismatching data types - TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::QS8, 2), // Mismatching fixed point position TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), // Invalid weights dimensions TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), // Wrongly reshaped weights }), framework::dataset::make("WeightsInfo",{ TensorInfo(TensorShape(315U, 271U), 1, DataType::F16), - TensorInfo(TensorShape(315U, 271U), 1, DataType::QS8, 3), TensorInfo(TensorShape(192U, 192U), 1, DataType::F32), TensorInfo(TensorShape(192U, 192U), 1, DataType::F32), TensorInfo(TensorShape(217U, 231U), 1, DataType::F32), TensorInfo(TensorShape(217U, 315U), 1, DataType::F32), })), framework::dataset::make("BiasInfo",{ TensorInfo(TensorShape(271U), 1, DataType::F32), - TensorInfo(TensorShape(271U), 1, DataType::QS8, 2), TensorInfo(TensorShape(192U), 1, DataType::F32), TensorInfo(TensorShape(192U), 1, DataType::F32), TensorInfo(TensorShape(271U), 1, DataType::F32), TensorInfo(TensorShape(271U), 1, DataType::F32), })), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(271U, 3U), 1, DataType::F32), - TensorInfo(TensorShape(271U, 3U), 1, DataType::QS8, 3), TensorInfo(TensorShape(192U, 4U), 1, DataType::F32), TensorInfo(TensorShape(192U, 4U), 1, DataType::F32), TensorInfo(TensorShape(271U, 3U), 1, DataType::F32), TensorInfo(TensorShape(271U, 3U), 1, DataType::F32), })), - framework::dataset::make("TransposeWeights",{ true, true, true, false, true, true })), - framework::dataset::make("ReshapedWeights",{ false, false, false, false, false, false})), - framework::dataset::make("Expected", { false, false, true, true, false, false })), + framework::dataset::make("TransposeWeights",{ true, true, false, true, true })), + framework::dataset::make("ReshapedWeights",{ false, false, false, false, false})), + framework::dataset::make("Expected", { false, true, true, false, false })), input_info, weights_info, bias_info, output_info, transpose_weights, reshaped_weights, expected) { Status status = CLFullyConnectedLayer::validate(&input_info.clone()->set_is_resizable(false), @@ -202,52 +194,6 @@ TEST_SUITE_END() template using CLFullyConnectedLayerFixedPointFixture = FullyConnectedLayerValidationFixedPointFixture; -TEST_SUITE(FixedPoint) -TEST_SUITE(QS8) -// Testing for fixed point position [1,6) as reciprocal limits the maximum fixed point position to 5 -FIXTURE_DATA_TEST_CASE(RunTiny, CLFullyConnectedLayerFixedPointFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::TinyFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", - DataType::QS8)), - framework::dataset::make("FractionalBits", 1, 6))) -{ - // Validate output - validate(CLAccessor(_target), _reference, tolerance_fixed_point); -} -FIXTURE_DATA_TEST_CASE(RunSmall, CLFullyConnectedLayerFixedPointFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", - DataType::QS8)), - framework::dataset::make("FractionalBits", 1, 6))) -{ - // Validate output - validate(CLAccessor(_target), _reference, tolerance_fixed_point); -} -TEST_SUITE_END() - -TEST_SUITE(QS16) -// Testing for fixed point position [1,14) as reciprocal limits the maximum fixed point position to 14 -FIXTURE_DATA_TEST_CASE(RunTiny, CLFullyConnectedLayerFixedPointFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::TinyFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", - DataType::QS16)), - framework::dataset::make("FractionalBits", 1, 14))) -{ - // Validate output - validate(CLAccessor(_target), _reference, tolerance_fixed_point); -} -FIXTURE_DATA_TEST_CASE(RunSmall, CLFullyConnectedLayerFixedPointFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::SmallFullyConnectedLayerDataset(), - FullyConnectedParameters), - framework::dataset::make("DataType", - DataType::QS16)), - framework::dataset::make("FractionalBits", 1, 14))) -{ - // Validate output - validate(CLAccessor(_target), _reference, tolerance_fixed_point); -} -TEST_SUITE_END() -TEST_SUITE_END() - template using CLFullyConnectedLayerQuantizedFixture = FullyConnectedLayerValidationQuantizedFixture; -- cgit v1.2.1