From 3c7c1fa6c589f75fd8146a47fe71094c172fd56a Mon Sep 17 00:00:00 2001 From: Omar Al Khatib Date: Tue, 7 Mar 2023 09:57:49 +0000 Subject: Resolve the presence of variables that are unused in release mode in Dynamic Fusion source files Resloves: [COMPMID-5960] Signed-off-by: Omar Al Khatib Change-Id: I1b11f01c51a029082ed05823717b4c4ae4897798 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9270 Tested-by: Arm Jenkins Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/validation/dynamic_fusion/gpu/cl/Add.cpp | 17 ++++++++--------- tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) (limited to 'tests/validation') diff --git a/tests/validation/dynamic_fusion/gpu/cl/Add.cpp b/tests/validation/dynamic_fusion/gpu/cl/Add.cpp index afe5ee4da1..0034b0f07f 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/Add.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/Add.cpp @@ -100,8 +100,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip( // clang-format on // *INDENT-ON* -constexpr AbsoluteTolerance tolerance_f16(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F16 */ -constexpr AbsoluteTolerance tolerance_f32(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 */ +constexpr AbsoluteTolerance tolerance_f(0.0001f); /**< Tolerance value for comparing reference's output against implementation's output for DataType::F32 and DataType::F16 */ constexpr float tolerance_num = 0.0001f; /**< Tolerance number */ template @@ -123,7 +122,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunLargeOneOp, DynamicFusionCLAddFixture, @@ -134,7 +133,7 @@ FIXTURE_DATA_TEST_CASE(RunLargeOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, DynamicFusionCLAddBroadcastFixture, @@ -145,7 +144,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunLargeBroadcastOneOp, @@ -157,7 +156,7 @@ FIXTURE_DATA_TEST_CASE(RunLargeBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } FIXTURE_DATA_TEST_CASE(RunSmallTwoOps, DynamicFusionCLAddTwoOpsFixture, @@ -169,7 +168,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallTwoOps, framework::dataset::make("FuseTwoOps", { true }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32); + validate(CLAccessor(_target), _reference, tolerance_f); } TEST_SUITE_END() // FP32 @@ -183,7 +182,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32, tolerance_num); + validate(CLAccessor(_target), _reference, tolerance_f, tolerance_num); } FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, @@ -195,7 +194,7 @@ FIXTURE_DATA_TEST_CASE(RunSmallBroadcastOneOp, framework::dataset::make("InPlace", { false }))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f32, tolerance_num); + validate(CLAccessor(_target), _reference, tolerance_f, tolerance_num); } TEST_SUITE_END() // FP16 diff --git a/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp b/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp index 51822b045a..6d88be448e 100644 --- a/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp +++ b/tests/validation/dynamic_fusion/gpu/cl/Reshape.cpp @@ -38,12 +38,9 @@ TEST_SUITE(CL) TEST_SUITE(DYNAMIC_FUSION) TEST_SUITE(RESHAPE) -DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip( - framework::dataset::make("InputInfo", +DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(framework::dataset::make("InputInfo", { - TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), - TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), - TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), // mismatching dimensions + TensorInfo(TensorShape(9U, 5U, 7U, 3U), 1, DataType::F32), TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32), TensorInfo(TensorShape(8U, 4U, 6U, 4U), 1, DataType::F32) /*mismatching dimensions*/, }), framework::dataset::make("OutputShape", { @@ -61,7 +58,8 @@ input_info, output_shape, expected) // Create sketch tensors TensorShape input_shape = input_info.tensor_shape(); - TensorInfo src_info = sketch.create_tensor_info(input_info); + ARM_COMPUTE_UNUSED(input_shape); + TensorInfo src_info = sketch.create_tensor_info(input_info); ReshapeAttributes attributes; attributes.shape(output_shape); -- cgit v1.2.1