From 80838f166ee1d6eb152dc85f21642157b80301c0 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 12 Dec 2019 18:23:13 +0000 Subject: 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 Change-Id: Ia95d7e54929c8bc29e99dc80a61065e403b29a94 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2467 Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins --- tests/datasets/PoolingLayerDataset.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/datasets/PoolingLayerDataset.h') 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))); -- cgit v1.2.1