aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/CL/DirectConvolutionLayer.cpp
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2017-12-01 10:42:47 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:17 +0000
commit5948634bb97e05934e9eea180ba41dcddf874416 (patch)
treec96eb36e6242153bd1482310aa522fabd505c37d /tests/validation/CL/DirectConvolutionLayer.cpp
parent424eb5d0bf7f9fe890b06dc7109d570e31d59d68 (diff)
downloadComputeLibrary-5948634bb97e05934e9eea180ba41dcddf874416.tar.gz
COMPMID-617 Add window validation to CLDirectConvolutionLayer
Change-Id: Ia642dc68de6a0afe697bbce392e7ee955fa8944b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111460 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/CL/DirectConvolutionLayer.cpp')
-rw-r--r--tests/validation/CL/DirectConvolutionLayer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/validation/CL/DirectConvolutionLayer.cpp b/tests/validation/CL/DirectConvolutionLayer.cpp
index 4b747d64f7..e2e1b6abef 100644
--- a/tests/validation/CL/DirectConvolutionLayer.cpp
+++ b/tests/validation/CL/DirectConvolutionLayer.cpp
@@ -92,7 +92,8 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid biases size
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid biases dimensions
TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Invalid output size
- TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0),
+ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32, 0), // Window shrink
+ TensorInfo(TensorShape(32U, 16U, 2U), 1, DataType::F32, 0),
}),
framework::dataset::make("WeightsInfo",{ TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F16, 0),
TensorInfo(TensorShape(3U, 3U, 3U, 4U), 1, DataType::F32, 0),
@@ -104,6 +105,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(3U, 3U, 2U, 4U), 1, DataType::F32, 0),
+ TensorInfo(TensorShape(1U, 1U, 2U, 4U), 1, DataType::F32, 0),
})),
framework::dataset::make("BiasesInfo",{ TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
@@ -115,6 +117,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
TensorInfo(TensorShape(4U, 2U), 1, DataType::F32, 0),
TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
+ TensorInfo(TensorShape(4U), 1, DataType::F32, 0),
})),
framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(25U, 11U, 4U), 1, DataType::F32, 0),
@@ -126,6 +129,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
TensorInfo(TensorShape(25U, 11U, 4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(26U, 11U, 4U), 1, DataType::F32, 0),
TensorInfo(TensorShape(25U, 11U, 4U), 1, DataType::F32, 0),
+ TensorInfo(TensorShape(32U, 16U, 4U), 1, DataType::F32, 0),
})),
framework::dataset::make("ConvInfo", { PadStrideInfo(1, 1, 0, 0),
PadStrideInfo(1, 1, 0, 0),
@@ -137,11 +141,12 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(
PadStrideInfo(1, 1, 0, 0),
PadStrideInfo(1, 1, 0, 0),
PadStrideInfo(1, 1, 0, 0),
+ PadStrideInfo(1, 1, 0, 0),
})),
- framework::dataset::make("Expected", { true, true, true, true, true, true, true, true, true, false })),
+ framework::dataset::make("Expected", { true, true, true, true, true, true, true, true, true, true, false })),
input_info, weights_info, biases_info, output_info, conv_info, expected)
{
- bool is_error = bool(CLDirectConvolutionLayer::validate(&input_info, &weights_info, &biases_info, &output_info, conv_info));
+ bool is_error = bool(CLDirectConvolutionLayer::validate(&input_info.clone()->set_is_resizable(false), &weights_info.clone()->set_is_resizable(false), &biases_info.clone()->set_is_resizable(false), &output_info.clone()->set_is_resizable(false), conv_info));
ARM_COMPUTE_EXPECT(is_error == expected, framework::LogLevel::ERRORS);
}
// clang-format on