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