aboutsummaryrefslogtreecommitdiff
path: root/tests/datasets/PoolingLayerDataset.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-12-12 18:23:13 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-02-12 13:50:24 +0000
commit80838f166ee1d6eb152dc85f21642157b80301c0 (patch)
tree99cd7e0d85de12f1f9201ab76cc43b38af262884 /tests/datasets/PoolingLayerDataset.h
parent9bd49f979907fdef82a50f64a486c5d69df7ae39 (diff)
downloadComputeLibrary-80838f166ee1d6eb152dc85f21642157b80301c0.tar.gz
COMPMID-2819: Avoid overflows in pooling shape calculation
Pooling shape calculator was performing operations in the unsigned domain leading to overflows in irregular shapes. Thus, we perform all operations in the signed domain and we get the maximum between the given shape and 1, returning always a valid tensor. Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Ia95d7e54929c8bc29e99dc80a61065e403b29a94 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2467 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/datasets/PoolingLayerDataset.h')
-rw-r--r--tests/datasets/PoolingLayerDataset.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/datasets/PoolingLayerDataset.h b/tests/datasets/PoolingLayerDataset.h
index 56fcdc3d0f..943279ee46 100644
--- a/tests/datasets/PoolingLayerDataset.h
+++ b/tests/datasets/PoolingLayerDataset.h
@@ -106,6 +106,7 @@ public:
PoolingLayerDatasetSpecial()
{
// Special cases
+ add_config(TensorShape(2U, 3U, 4U, 1U), PoolingLayerInfo(PoolingType::AVG, Size2D(3, 3), DataLayout::NCHW, PadStrideInfo(3, 3, 0, 0), true));
add_config(TensorShape(60U, 52U, 3U, 2U), PoolingLayerInfo(PoolingType::AVG, Size2D(100, 100), DataLayout::NCHW, PadStrideInfo(5, 5, 50, 50), true));
// Asymmetric padding
add_config(TensorShape(112U, 112U, 32U), PoolingLayerInfo(PoolingType::MAX, 3, DataLayout::NCHW, PadStrideInfo(2, 2, 0, 1, 0, 1, DimensionRoundingType::FLOOR)));