aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2021-01-07 16:35:05 +0000
committerGiorgio Arena <giorgio.arena@arm.com>2021-01-08 17:11:46 +0000
commit4f8ce13e287867a699b4020583173339570e1917 (patch)
tree5d10a5196afc99a5ac516a5793135de524b1df40
parent70eb53b09adf57cc6ff7435c795e65a4f4697f67 (diff)
downloadComputeLibrary-4f8ce13e287867a699b4020583173339570e1917.tar.gz
[Nightly Failure] Fix NEIm2Col argument validation errors
- Permute input shape if NHWC for Im2Col's fixture Resolves: COMPMID-4081 Signed-off-by: Giorgio Arena <giorgio.arena@arm.com> Change-Id: I9a46569f1cb2c09932ffb1b0afda6d66e93452de Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4777 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--tests/validation/CL/Im2Col.cpp8
-rw-r--r--tests/validation/fixtures/Im2ColFixture.h7
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/validation/CL/Im2Col.cpp b/tests/validation/CL/Im2Col.cpp
index a31aec4d0c..c6006efcba 100644
--- a/tests/validation/CL/Im2Col.cpp
+++ b/tests/validation/CL/Im2Col.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -155,7 +155,7 @@ FIXTURE_DATA_TEST_CASE(W3x3,
combine(combine(combine(combine(combine(combine(
framework::dataset::make("InputShape",
{
- TensorShape(2U, 5U, 7U, 2U), TensorShape(3U, 4U, 6U, 2U), TensorShape(1U, 5U, 3U, 2U),
+ TensorShape(5U, 7U, 2U, 2U), TensorShape(4U, 6U, 3U, 2U), TensorShape(5U, 3U, 1U, 2U),
}),
framework::dataset::make("DataType", DataType::F32)),
framework::dataset::make("Kernel", Size2D(3, 3))),
@@ -185,7 +185,7 @@ FIXTURE_DATA_TEST_CASE(W9x9,
combine(combine(combine(combine(combine(combine(
framework::dataset::make("InputShape",
{
- TensorShape(2U, 13U, 15U, 2U), TensorShape(3U, 15U, 12U, 2U), TensorShape(1U, 13U, 22U, 2U),
+ TensorShape(13U, 15U, 2U, 2U), TensorShape(15U, 12U, 3U, 2U), TensorShape(13U, 22U, 1U, 2U),
}),
framework::dataset::make("DataType", DataType::F32)),
framework::dataset::make("Kernel", Size2D(9, 9))),
@@ -215,7 +215,7 @@ FIXTURE_DATA_TEST_CASE(Generic,
combine(combine(combine(combine(combine(combine(
framework::dataset::make("InputShape",
{
- TensorShape(4U, 13U, 15U, 2U), TensorShape(7U, 15U, 12U, 1U), TensorShape(1U, 5U, 3U, 1U),
+ TensorShape(13U, 15U, 4U, 2U), TensorShape(15U, 12U, 7U, 1U), TensorShape(5U, 3U, 1U, 1U),
}),
framework::dataset::make("DataType", DataType::F32)),
framework::dataset::make("Kernel", Size2D(5, 3))),
diff --git a/tests/validation/fixtures/Im2ColFixture.h b/tests/validation/fixtures/Im2ColFixture.h
index e1f33a3575..b6cf18bd4c 100644
--- a/tests/validation/fixtures/Im2ColFixture.h
+++ b/tests/validation/fixtures/Im2ColFixture.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -59,6 +59,11 @@ public:
_has_bias = data_type != DataType::QASYMM8;
_num_groups = num_groups;
+ if(_data_layout == DataLayout::NHWC)
+ {
+ permute(input_shape, PermutationVector(2U, 0U, 1U));
+ }
+
TensorInfo input_info(input_shape, 1, data_type);
input_info.set_data_layout(_data_layout);