Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 1 | // |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "../Dilation.hpp" |
| 7 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 8 | #include <1.2/HalPolicy.hpp> |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 9 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 10 | DOCTEST_TEST_SUITE("DilationTests") |
Sadik Armagan | 9150bff | 2021-05-26 15:40:53 +0100 | [diff] [blame] | 11 | { |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 12 | |
| 13 | DOCTEST_TEST_CASE("ConvolutionExplicitPaddingNoDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 14 | { |
| 15 | DilationTestOptions options; |
| 16 | options.m_IsDepthwiseConvolution = false; |
| 17 | options.m_IsPaddingExplicit = true; |
| 18 | options.m_HasDilation = false; |
| 19 | |
| 20 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 21 | } |
| 22 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 23 | DOCTEST_TEST_CASE("ConvolutionExplicitPaddingDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 24 | { |
| 25 | DilationTestOptions options; |
| 26 | options.m_IsDepthwiseConvolution = false; |
| 27 | options.m_IsPaddingExplicit = true; |
| 28 | options.m_HasDilation = true; |
| 29 | |
| 30 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 31 | } |
| 32 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 33 | DOCTEST_TEST_CASE("ConvolutionImplicitPaddingNoDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 34 | { |
| 35 | DilationTestOptions options; |
| 36 | options.m_IsDepthwiseConvolution = false; |
| 37 | options.m_IsPaddingExplicit = false; |
| 38 | options.m_HasDilation = false; |
| 39 | |
| 40 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 41 | } |
| 42 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 43 | DOCTEST_TEST_CASE("ConvolutionImplicitPaddingDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 44 | { |
| 45 | DilationTestOptions options; |
| 46 | options.m_IsDepthwiseConvolution = false; |
| 47 | options.m_IsPaddingExplicit = false; |
| 48 | options.m_HasDilation = true; |
| 49 | |
| 50 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 51 | } |
| 52 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 53 | DOCTEST_TEST_CASE("DepthwiseConvolutionExplicitPaddingNoDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 54 | { |
| 55 | DilationTestOptions options; |
| 56 | options.m_IsDepthwiseConvolution = true; |
| 57 | options.m_IsPaddingExplicit = true; |
| 58 | options.m_HasDilation = false; |
| 59 | |
| 60 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 61 | } |
| 62 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 63 | DOCTEST_TEST_CASE("DepthwiseConvolutionExplicitPaddingDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 64 | { |
| 65 | DilationTestOptions options; |
| 66 | options.m_IsDepthwiseConvolution = true; |
| 67 | options.m_IsPaddingExplicit = true; |
| 68 | options.m_HasDilation = true; |
| 69 | |
| 70 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 71 | } |
| 72 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 73 | DOCTEST_TEST_CASE("DepthwiseConvolutionImplicitPaddingNoDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 74 | { |
| 75 | DilationTestOptions options; |
| 76 | options.m_IsDepthwiseConvolution = true; |
| 77 | options.m_IsPaddingExplicit = false; |
| 78 | options.m_HasDilation = false; |
| 79 | |
| 80 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 81 | } |
| 82 | |
Mike Kelly | e2d611e | 2021-10-14 12:35:58 +0100 | [diff] [blame] | 83 | DOCTEST_TEST_CASE("DepthwiseConvolutionImplicitPaddingDilation") |
Aron Virginas-Tar | 44cfd84 | 2019-06-14 15:45:03 +0100 | [diff] [blame] | 84 | { |
| 85 | DilationTestOptions options; |
| 86 | options.m_IsDepthwiseConvolution = true; |
| 87 | options.m_IsPaddingExplicit = false; |
| 88 | options.m_HasDilation = true; |
| 89 | |
| 90 | DilationTestImpl<hal_1_2::HalPolicy>(options); |
| 91 | } |
| 92 | |
Sadik Armagan | 9150bff | 2021-05-26 15:40:53 +0100 | [diff] [blame] | 93 | } |