Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "RankTestImpl.hpp" |
| 7 | |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 8 | #include <DataTypeUtils.hpp> |
| 9 | #include <armnnTestUtils/TensorCopyUtils.hpp> |
Colm Donelan | 0c47974 | 2021-12-10 12:43:54 +0000 | [diff] [blame] | 10 | #include <armnnTestUtils/WorkloadTestUtils.hpp> |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 11 | |
Sadik Armagan | a097d2a | 2021-11-24 15:47:28 +0000 | [diff] [blame] | 12 | #include <TensorHelpers.hpp> |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 13 | |
| 14 | template<typename T, std::size_t n> |
| 15 | LayerTestResult<int32_t, 1> RankTest( |
| 16 | armnn::TensorInfo inputTensorInfo, |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 17 | std::vector<T> input, |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 18 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 19 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 20 | const armnn::ITensorHandleFactory& tensorHandleFactory) |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 21 | { |
| 22 | IgnoreUnused(memoryManager); |
| 23 | |
| 24 | const armnn::TensorShape outputShape{armnn::Dimensionality::Scalar}; |
| 25 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 26 | |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 27 | std::vector<int32_t> actualOutput(outputTensorInfo.GetNumElements()); |
| 28 | std::vector<int32_t> expectedOutput = { n }; |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 29 | |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 30 | std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory.CreateTensorHandle(inputTensorInfo); |
| 31 | std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory.CreateTensorHandle(outputTensorInfo); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 32 | |
| 33 | armnn::RankQueueDescriptor data; |
| 34 | armnn::WorkloadInfo info; |
| 35 | AddInputToWorkload(data, info, inputTensorInfo, inputHandle.get()); |
| 36 | AddOutputToWorkload(data, info, outputTensorInfo, outputHandle.get()); |
| 37 | |
| 38 | std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateRank(data, info); |
| 39 | |
| 40 | inputHandle->Allocate(); |
| 41 | outputHandle->Allocate(); |
| 42 | |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 43 | CopyDataToITensorHandle(inputHandle.get(), input.data()); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 44 | |
| 45 | workload->Execute(); |
| 46 | |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 47 | CopyDataFromITensorHandle(actualOutput.data(), outputHandle.get()); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 48 | |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 49 | return LayerTestResult<int32_t, 1>(actualOutput, |
| 50 | expectedOutput, |
| 51 | outputHandle->GetShape(), |
| 52 | outputTensorInfo.GetShape()); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | template<armnn::DataType ArmnnType, typename T> |
| 56 | LayerTestResult<int32_t, 1> RankDimSize1Test( |
| 57 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 58 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 59 | const armnn::ITensorHandleFactory& tensorHandleFactory) |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 60 | { |
| 61 | armnn::TensorInfo inputTensorInfo({6}, ArmnnType, 1.0f, 0); |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 62 | auto input = ConvertToDataType<ArmnnType>({ -37.5f, -15.2f, -8.76f, -2.0f, -1.3f, -0.5f }, inputTensorInfo); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 63 | |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 64 | return RankTest<T, 1>(inputTensorInfo, input, workloadFactory, memoryManager, tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | template<armnn::DataType ArmnnType, typename T> |
| 68 | LayerTestResult<int32_t, 1> RankDimSize2Test( |
| 69 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 70 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 71 | const armnn::ITensorHandleFactory& tensorHandleFactory) |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 72 | { |
| 73 | armnn::TensorInfo inputTensorInfo({1, 3}, ArmnnType, 1.0f, 0); |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 74 | auto input = ConvertToDataType<ArmnnType>({ -37.5f, -15.2f, -8.76f }, inputTensorInfo); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 75 | |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 76 | return RankTest<T, 2>(inputTensorInfo, input, workloadFactory, memoryManager, tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | template<armnn::DataType ArmnnType, typename T> |
| 80 | LayerTestResult<int32_t, 1> RankDimSize3Test( |
| 81 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 82 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 83 | const armnn::ITensorHandleFactory& tensorHandleFactory) |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 84 | { |
| 85 | armnn::TensorInfo inputTensorInfo({1, 3, 2}, ArmnnType, 1.0f, 0); |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 86 | auto input = ConvertToDataType<ArmnnType>({ -37.5f, -15.2f, -8.76f, -2.0f, -1.5f, -1.3f}, inputTensorInfo); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 87 | |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 88 | return RankTest<T, 3>(inputTensorInfo, input, workloadFactory, memoryManager, tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | template<armnn::DataType ArmnnType, typename T> |
| 92 | LayerTestResult<int32_t, 1> RankDimSize4Test( |
| 93 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 94 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 95 | const armnn::ITensorHandleFactory& tensorHandleFactory) |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 96 | { |
| 97 | armnn::TensorInfo inputTensorInfo({1, 3, 2, 3}, ArmnnType, 1.0f, 0); |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 98 | auto input = ConvertToDataType<ArmnnType>( |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 99 | { -37.5f, -15.2f, -8.76f, -2.0f, -1.5f, -1.3f, -0.5f, -0.4f, 0.0f, |
| 100 | 1.0f, 0.4f, 0.5f, 1.3f, 1.5f, 2.0f, 8.76f, 15.2f, 37.5f }, |
Sadik Armagan | 483c811 | 2021-06-01 09:24:52 +0100 | [diff] [blame] | 101 | inputTensorInfo); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 102 | |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 103 | return RankTest<T, 4>(inputTensorInfo, input, workloadFactory, memoryManager, tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | template LayerTestResult<int32_t, 1> |
| 107 | RankDimSize4Test<armnn::DataType::Float16>( |
| 108 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 109 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 110 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 111 | |
| 112 | template LayerTestResult<int32_t, 1> |
| 113 | RankDimSize4Test<armnn::DataType::Float32>( |
| 114 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 115 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 116 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 117 | |
| 118 | template LayerTestResult<int32_t, 1> |
| 119 | RankDimSize4Test<armnn::DataType::QAsymmU8>( |
| 120 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 121 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 122 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 123 | |
| 124 | template LayerTestResult<int32_t, 1> |
| 125 | RankDimSize4Test<armnn::DataType::Signed32>( |
| 126 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 127 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 128 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 129 | |
| 130 | template LayerTestResult<int32_t, 1> |
| 131 | RankDimSize4Test<armnn::DataType::QSymmS16>( |
| 132 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 133 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 134 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 135 | |
| 136 | template LayerTestResult<int32_t, 1> |
| 137 | RankDimSize4Test<armnn::DataType::QSymmS8>( |
| 138 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 139 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 140 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 141 | |
| 142 | template LayerTestResult<int32_t, 1> |
| 143 | RankDimSize4Test<armnn::DataType::QAsymmS8>( |
| 144 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 145 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 146 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 147 | |
| 148 | template LayerTestResult<int32_t, 1> |
| 149 | RankDimSize4Test<armnn::DataType::BFloat16>( |
| 150 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 151 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 152 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 153 | |
| 154 | template LayerTestResult<int32_t, 1> |
| 155 | RankDimSize3Test<armnn::DataType::Float16>( |
| 156 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 157 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 158 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 159 | |
| 160 | template LayerTestResult<int32_t, 1> |
| 161 | RankDimSize3Test<armnn::DataType::Float32>( |
| 162 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 163 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 164 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 165 | |
| 166 | template LayerTestResult<int32_t, 1> |
| 167 | RankDimSize3Test<armnn::DataType::QAsymmU8>( |
| 168 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 169 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 170 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 171 | |
| 172 | template LayerTestResult<int32_t, 1> |
| 173 | RankDimSize3Test<armnn::DataType::Signed32>( |
| 174 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 175 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 176 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 177 | |
| 178 | template LayerTestResult<int32_t, 1> |
| 179 | RankDimSize3Test<armnn::DataType::QSymmS16>( |
| 180 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 181 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 182 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 183 | |
| 184 | template LayerTestResult<int32_t, 1> |
| 185 | RankDimSize3Test<armnn::DataType::QSymmS8>( |
| 186 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 187 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 188 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 189 | |
| 190 | template LayerTestResult<int32_t, 1> |
| 191 | RankDimSize3Test<armnn::DataType::QAsymmS8>( |
| 192 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 193 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 194 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 195 | |
| 196 | template LayerTestResult<int32_t, 1> |
| 197 | RankDimSize3Test<armnn::DataType::BFloat16>( |
| 198 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 199 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 200 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 201 | |
| 202 | template LayerTestResult<int32_t, 1> |
| 203 | RankDimSize2Test<armnn::DataType::Float16>( |
| 204 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 205 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 206 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 207 | |
| 208 | template LayerTestResult<int32_t, 1> |
| 209 | RankDimSize2Test<armnn::DataType::Float32>( |
| 210 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 211 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 212 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 213 | |
| 214 | template LayerTestResult<int32_t, 1> |
| 215 | RankDimSize2Test<armnn::DataType::QAsymmU8>( |
| 216 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 217 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 218 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 219 | |
| 220 | template LayerTestResult<int32_t, 1> |
| 221 | RankDimSize2Test<armnn::DataType::Signed32>( |
| 222 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 223 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 224 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 225 | |
| 226 | template LayerTestResult<int32_t, 1> |
| 227 | RankDimSize2Test<armnn::DataType::QSymmS16>( |
| 228 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 229 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 230 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 231 | |
| 232 | template LayerTestResult<int32_t, 1> |
| 233 | RankDimSize2Test<armnn::DataType::QSymmS8>( |
| 234 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 235 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 236 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 237 | |
| 238 | template LayerTestResult<int32_t, 1> |
| 239 | RankDimSize2Test<armnn::DataType::QAsymmS8>( |
| 240 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 241 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 242 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 243 | |
| 244 | template LayerTestResult<int32_t, 1> |
| 245 | RankDimSize2Test<armnn::DataType::BFloat16>( |
| 246 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 247 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 248 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 249 | |
| 250 | template LayerTestResult<int32_t, 1> |
| 251 | RankDimSize1Test<armnn::DataType::Float16>( |
| 252 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 253 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 254 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 255 | |
| 256 | template LayerTestResult<int32_t, 1> |
| 257 | RankDimSize1Test<armnn::DataType::Float32>( |
| 258 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 259 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 260 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 261 | |
| 262 | template LayerTestResult<int32_t, 1> |
| 263 | RankDimSize1Test<armnn::DataType::QAsymmU8>( |
| 264 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 265 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 266 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 267 | |
| 268 | template LayerTestResult<int32_t, 1> |
| 269 | RankDimSize1Test<armnn::DataType::Signed32>( |
| 270 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 271 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 272 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 273 | |
| 274 | template LayerTestResult<int32_t, 1> |
| 275 | RankDimSize1Test<armnn::DataType::QSymmS16>( |
| 276 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 277 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 278 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 279 | |
| 280 | template LayerTestResult<int32_t, 1> |
| 281 | RankDimSize1Test<armnn::DataType::QSymmS8>( |
| 282 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 283 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 284 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 285 | |
| 286 | template LayerTestResult<int32_t, 1> |
| 287 | RankDimSize1Test<armnn::DataType::QAsymmS8>( |
| 288 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 289 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 290 | const armnn::ITensorHandleFactory& tensorHandleFactory); |
Finn Williams | 2605b23 | 2020-06-10 15:53:46 +0100 | [diff] [blame] | 291 | |
| 292 | template LayerTestResult<int32_t, 1> |
| 293 | RankDimSize1Test<armnn::DataType::BFloat16>( |
| 294 | armnn::IWorkloadFactory& workloadFactory, |
Finn Williams | ec36d3e | 2020-08-28 13:17:05 +0100 | [diff] [blame] | 295 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 296 | const armnn::ITensorHandleFactory& tensorHandleFactory); |