From 3ff449c42d709e640ca904c41a241bb94fc9e335 Mon Sep 17 00:00:00 2001 From: Mirzam98 Date: Sat, 12 Dec 2020 23:58:40 +0100 Subject: [PATCH] [test_conv_lowering]: included 1D depthwise and regular convolutions in tests --- tests/transformation/test_conv_lowering.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/transformation/test_conv_lowering.py b/tests/transformation/test_conv_lowering.py index 75c8d1a..b022e1b 100644 --- a/tests/transformation/test_conv_lowering.py +++ b/tests/transformation/test_conv_lowering.py @@ -165,10 +165,10 @@ def test_non_equal_padding( @pytest.mark.parametrize("idt", [DataType.INT2, DataType.INT4]) # kernel size @pytest.mark.parametrize("k_H", [2, 4]) -@pytest.mark.parametrize("k_W", [2, 4]) +@pytest.mark.parametrize("k_W", [2, 4, 1]) # input dimension @pytest.mark.parametrize("ifm_dim_H", [4, 6]) -@pytest.mark.parametrize("ifm_dim_W", [4, 6]) +@pytest.mark.parametrize("ifm_dim_W", [4, 6, 1]) # input channels @pytest.mark.parametrize("ifm_ch", [2, 3]) # stride @@ -182,6 +182,13 @@ def test_depthwise_conv_lowering( pytest.skip("Kernel height must be smaller than image height") if k_W > ifm_dim_W: pytest.skip("Kernel width must be smaller than image height") + # Ensure the right padding parameters are set + if ifm_dim_H == 1: + padding[0] = 0 + padding[2] = 0 + if ifm_dim_W == 1: + padding[1] = 0 + padding[3] = 0 wdt = idt odt = DataType.INT32