Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "LayerTestResult.hpp" |
| 9 | |
| 10 | #include <ResolveType.hpp> |
| 11 | |
| 12 | #include <armnn/Types.hpp> |
| 13 | |
Matteo Martincigh | e5b8eb9 | 2019-11-28 15:45:42 +0000 | [diff] [blame] | 14 | #include <armnn/backends/IBackendInternal.hpp> |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 15 | #include <backendsCommon/WorkloadFactory.hpp> |
| 16 | |
| 17 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 18 | LayerTestResult<T, 2> Pad2dTestCommon( |
| 19 | armnn::IWorkloadFactory& workloadFactory, |
| 20 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 21 | float qScale, |
| 22 | int32_t qOffset, |
| 23 | const float customPaddingValue = 0.0f); |
| 24 | |
| 25 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 26 | LayerTestResult<T, 3> Pad3dTestCommon( |
| 27 | armnn::IWorkloadFactory& workloadFactory, |
| 28 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 29 | float qScale, |
| 30 | int32_t qOffset); |
| 31 | |
| 32 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 33 | LayerTestResult<T, 4> Pad4dTestCommon( |
| 34 | armnn::IWorkloadFactory& workloadFactory, |
| 35 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 36 | float qScale, |
| 37 | int32_t qOffset); |
| 38 | |
| 39 | LayerTestResult<uint8_t, 2> PadUint82dTest( |
| 40 | armnn::IWorkloadFactory& workloadFactory, |
| 41 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 42 | |
| 43 | LayerTestResult<uint8_t, 2> PadUint82dCustomPaddingTest( |
| 44 | armnn::IWorkloadFactory& workloadFactory, |
| 45 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 46 | |
| 47 | LayerTestResult<uint8_t, 3> PadUint83dTest( |
| 48 | armnn::IWorkloadFactory& workloadFactory, |
| 49 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 50 | |
| 51 | LayerTestResult<uint8_t, 4> PadUint84dTest( |
| 52 | armnn::IWorkloadFactory& workloadFactory, |
| 53 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 54 | |
| 55 | LayerTestResult<float, 2> PadFloat322dTest( |
| 56 | armnn::IWorkloadFactory& workloadFactory, |
| 57 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 58 | |
| 59 | LayerTestResult<float, 2> PadFloat322dCustomPaddingTest( |
| 60 | armnn::IWorkloadFactory& workloadFactory, |
| 61 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 62 | |
| 63 | LayerTestResult<float, 3> PadFloat323dTest( |
| 64 | armnn::IWorkloadFactory& workloadFactory, |
| 65 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 66 | |
| 67 | LayerTestResult<float, 4> PadFloat324dTest( |
| 68 | armnn::IWorkloadFactory& workloadFactory, |
| 69 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
Narumol Prangnawarat | 44179c3 | 2020-03-11 14:51:27 +0000 | [diff] [blame] | 70 | |
| 71 | LayerTestResult<armnn::BFloat16, 2> PadBFloat162dTest( |
| 72 | armnn::IWorkloadFactory& workloadFactory, |
| 73 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 74 | |
| 75 | LayerTestResult<armnn::BFloat16, 2> PadBFloat162dCustomPaddingTest( |
| 76 | armnn::IWorkloadFactory& workloadFactory, |
| 77 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 78 | |
| 79 | LayerTestResult<armnn::BFloat16, 3> PadBFloat163dTest( |
| 80 | armnn::IWorkloadFactory& workloadFactory, |
| 81 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 82 | |
| 83 | LayerTestResult<armnn::BFloat16, 4> PadBFloat164dTest( |
| 84 | armnn::IWorkloadFactory& workloadFactory, |
| 85 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
Sadik Armagan | 041b3c0 | 2020-06-04 10:32:18 +0100 | [diff] [blame] | 86 | |
| 87 | LayerTestResult<int8_t, 2> PadInt82dTest( |
| 88 | armnn::IWorkloadFactory& workloadFactory, |
| 89 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 90 | |
| 91 | LayerTestResult<int8_t, 2> PadInt82dCustomPaddingTest( |
| 92 | armnn::IWorkloadFactory& workloadFactory, |
| 93 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 94 | |
| 95 | LayerTestResult<int8_t, 3> PadInt83dTest( |
| 96 | armnn::IWorkloadFactory& workloadFactory, |
| 97 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 98 | |
| 99 | LayerTestResult<int8_t, 4> PadInt84dTest( |
| 100 | armnn::IWorkloadFactory& workloadFactory, |
| 101 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |