Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2019 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "ArgMinMaxTestImpl.hpp" |
| 7 | |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 8 | |
| 9 | #include <backendsCommon/test/DataTypeUtils.hpp> |
| 10 | #include <backendsCommon/test/TensorCopyUtils.hpp> |
| 11 | #include <backendsCommon/test/WorkloadTestUtils.hpp> |
| 12 | |
| 13 | #include <test/TensorHelpers.hpp> |
| 14 | |
| 15 | namespace |
| 16 | { |
| 17 | |
| 18 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 19 | LayerTestResult<int32_t, 3> ArgMinMaxTestCommon( |
| 20 | armnn::IWorkloadFactory& workloadFactory, |
| 21 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 22 | armnn::ArgMinMaxFunction argMinMaxFunction, |
| 23 | const armnn::TensorInfo inputTensorInfo, |
| 24 | const armnn::TensorInfo outputTensorInfo, |
| 25 | const std::vector<float>& inputData, |
| 26 | const std::vector<int32_t>& outputData, |
| 27 | int axis = 3) |
| 28 | { |
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 29 | IgnoreUnused(memoryManager); |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 30 | auto inputTensor = MakeTensor<T, 4>(inputTensorInfo, ConvertToDataType<ArmnnType>(inputData, inputTensorInfo)); |
| 31 | |
| 32 | LayerTestResult<int32_t, 3> result(outputTensorInfo); |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 33 | result.outputExpected = MakeTensor<int32_t, 3>(outputTensorInfo, outputData); |
| 34 | |
| 35 | std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo); |
| 36 | std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo); |
| 37 | |
| 38 | armnn::ArgMinMaxQueueDescriptor descriptor; |
| 39 | descriptor.m_Parameters.m_Function = argMinMaxFunction; |
| 40 | descriptor.m_Parameters.m_Axis = axis; |
| 41 | armnn::WorkloadInfo info; |
| 42 | |
| 43 | AddInputToWorkload(descriptor, info, inputTensorInfo, inputHandle.get()); |
| 44 | AddOutputToWorkload(descriptor, info, outputTensorInfo, outputHandle.get()); |
| 45 | |
| 46 | std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateArgMinMax(descriptor, info); |
| 47 | |
| 48 | inputHandle->Allocate(); |
| 49 | outputHandle->Allocate(); |
| 50 | |
| 51 | CopyDataToITensorHandle(inputHandle.get(), &inputTensor[0][0][0][0]); |
| 52 | |
| 53 | workload->PostAllocationConfigure(); |
| 54 | workload->Execute(); |
| 55 | |
| 56 | CopyDataFromITensorHandle(&result.output[0][0][0], outputHandle.get()); |
| 57 | |
| 58 | return result; |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | } // namespace |
| 62 | |
| 63 | template<armnn::DataType ArmnnType, typename T> |
| 64 | LayerTestResult<int32_t, 3> ArgMaxSimpleTest( |
| 65 | armnn::IWorkloadFactory& workloadFactory, |
| 66 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 67 | { |
| 68 | const armnn::TensorShape inputShape{ 1, 1, 1, 5 }; |
| 69 | const armnn::TensorShape outputShape{ 1, 1, 1 }; |
| 70 | |
| 71 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 72 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 73 | if (armnn::IsQuantizedType<T>()) |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 74 | { |
| 75 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 76 | inputTensorInfo.SetQuantizationOffset(0); |
| 77 | } |
| 78 | |
| 79 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 80 | |
| 81 | std::vector<float> inputValues({ 5.0f, 2.0f, 8.0f, 10.0f, 9.0f }); |
| 82 | std::vector<int32_t> outputValues({ 3 }); |
| 83 | |
| 84 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 85 | armnn::ArgMinMaxFunction::Max, |
| 86 | inputTensorInfo, outputTensorInfo, |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 87 | inputValues, outputValues, -1); // axis -1 === 3 |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | template<armnn::DataType ArmnnType, typename T> |
| 91 | LayerTestResult<int32_t, 3> ArgMinSimpleTest( |
| 92 | armnn::IWorkloadFactory& workloadFactory, |
| 93 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 94 | { |
| 95 | const armnn::TensorShape inputShape{ 1, 1, 1, 5 }; |
| 96 | const armnn::TensorShape outputShape{ 1, 1, 1 }; |
| 97 | |
| 98 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 99 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 100 | if (armnn::IsQuantizedType<T>()) |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 101 | { |
| 102 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 103 | inputTensorInfo.SetQuantizationOffset(0); |
| 104 | } |
| 105 | |
| 106 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 107 | |
| 108 | std::vector<float> inputValues({ 5.0f, 2.0f, 8.0f, 10.0f, 9.0f }); |
| 109 | std::vector<int32_t> outputValues({ 1 }); |
| 110 | |
| 111 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 112 | armnn::ArgMinMaxFunction::Min, |
| 113 | inputTensorInfo, outputTensorInfo, |
| 114 | inputValues, outputValues, 3); |
| 115 | } |
| 116 | |
| 117 | template<armnn::DataType ArmnnType, typename T> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 118 | LayerTestResult<int32_t, 3> ArgMinChannelTest( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 119 | armnn::IWorkloadFactory& workloadFactory, |
| 120 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 121 | { |
| 122 | const armnn::TensorShape inputShape{ 1, 3, 2, 4}; |
| 123 | const armnn::TensorShape outputShape{ 1, 2, 4 }; |
| 124 | |
| 125 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 126 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 127 | if (armnn::IsQuantizedType<T>()) |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 128 | { |
| 129 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 130 | inputTensorInfo.SetQuantizationOffset(0); |
| 131 | } |
| 132 | |
| 133 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 134 | |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 135 | std::vector<float> inputValues({ 1.0f, 2.0f, 3.0f, 4.0f, |
| 136 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 137 | |
| 138 | 10.0f, 20.0f, 30.0f, 40.0f, |
| 139 | 50.0f, 60.0f, 70.0f, 80.0f, |
| 140 | |
| 141 | 100.0f, 200.0f, 300.0f, 400.0f, |
| 142 | 500.0f, 600.0f, 700.0f, 800.0f }); |
| 143 | std::vector<int32_t> outputValues({ 0, 0, 0, 0, |
| 144 | 0, 0, 0, 0 }); |
| 145 | |
| 146 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 147 | armnn::ArgMinMaxFunction::Min, |
| 148 | inputTensorInfo, outputTensorInfo, |
| 149 | inputValues, outputValues, 1); |
| 150 | } |
| 151 | |
| 152 | template<armnn::DataType ArmnnType, typename T> |
| 153 | LayerTestResult<int32_t, 3> ArgMaxChannelTest( |
| 154 | armnn::IWorkloadFactory& workloadFactory, |
| 155 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 156 | { |
| 157 | const armnn::TensorShape inputShape{ 1, 3, 2, 4}; |
| 158 | const armnn::TensorShape outputShape{ 1, 2, 4 }; |
| 159 | |
| 160 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 161 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 162 | if (armnn::IsQuantizedType<T>()) |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 163 | { |
| 164 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 165 | inputTensorInfo.SetQuantizationOffset(0); |
| 166 | } |
| 167 | |
| 168 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 169 | |
| 170 | std::vector<float> inputValues({ 1.0f, 2.0f, 3.0f, 4.0f, |
| 171 | 5.0f, 6.0f, 7.0f, 8.0f, |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 172 | |
| 173 | 10.0f, 20.0f, 30.0f, 40.0f, |
| 174 | 50.0f, 60.0f, 70.0f, 80.0f, |
| 175 | |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 176 | 100.0f, 200.0f, 300.0f, 400.0f, |
| 177 | 500.0f, 600.0f, 700.0f, 800.0f }); |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 178 | std::vector<int32_t> outputValues({ 2, 2, 2, 2, |
| 179 | 2, 2, 2, 2 }); |
| 180 | |
| 181 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 182 | armnn::ArgMinMaxFunction::Max, |
| 183 | inputTensorInfo, outputTensorInfo, |
| 184 | inputValues, outputValues, 1); |
| 185 | } |
| 186 | |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 187 | template<armnn::DataType ArmnnType, typename T> |
| 188 | LayerTestResult<int32_t, 3> ArgMaxHeightTest( |
| 189 | armnn::IWorkloadFactory& workloadFactory, |
| 190 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 191 | { |
| 192 | const armnn::TensorShape inputShape{ 1, 3, 2, 4}; |
James Conroy | c8724c7 | 2019-10-08 15:41:34 +0100 | [diff] [blame] | 193 | const armnn::TensorShape outputShape{ 1, 3, 4 }; |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 194 | |
| 195 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 196 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 197 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 198 | if (armnn::IsQuantizedType<T>()) |
| 199 | { |
| 200 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 201 | inputTensorInfo.SetQuantizationOffset(0); |
| 202 | } |
| 203 | |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 204 | std::vector<float> inputValues({ 1.0f, 2.0f, 3.0f, 4.0f, |
| 205 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 206 | |
| 207 | 10.0f, 20.0f, 30.0f, 40.0f, |
| 208 | 50.0f, 60.0f, 70.0f, 80.0f, |
| 209 | |
| 210 | 100.0f, 200.0f, 300.0f, 400.0f, |
| 211 | 500.0f, 600.0f, 700.0f, 800.0f }); |
| 212 | std::vector<int32_t> outputValues({ 1, 1, 1, 1, |
| 213 | 1, 1, 1, 1, |
| 214 | 1, 1, 1, 1 }); |
| 215 | |
| 216 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 217 | armnn::ArgMinMaxFunction::Max, |
| 218 | inputTensorInfo, outputTensorInfo, |
| 219 | inputValues, outputValues, 2); |
| 220 | } |
| 221 | |
| 222 | template<armnn::DataType ArmnnType, typename T> |
| 223 | LayerTestResult<int32_t, 3> ArgMinWidthTest( |
| 224 | armnn::IWorkloadFactory& workloadFactory, |
| 225 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager) |
| 226 | { |
| 227 | const armnn::TensorShape inputShape{ 1, 3, 2, 4}; |
James Conroy | c8724c7 | 2019-10-08 15:41:34 +0100 | [diff] [blame] | 228 | const armnn::TensorShape outputShape{ 1, 3, 2 }; |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 229 | |
| 230 | armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType); |
| 231 | armnn::TensorInfo outputTensorInfo(outputShape, armnn::DataType::Signed32); |
| 232 | |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 233 | if (armnn::IsQuantizedType<T>()) |
| 234 | { |
| 235 | inputTensorInfo.SetQuantizationScale(1.0f); |
| 236 | inputTensorInfo.SetQuantizationOffset(0); |
| 237 | } |
| 238 | |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 239 | std::vector<float> inputValues({ 1.0f, 2.0f, 3.0f, 4.0f, |
| 240 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 241 | |
| 242 | 10.0f, 20.0f, 30.0f, 40.0f, |
| 243 | 50.0f, 60.0f, 70.0f, 80.0f, |
| 244 | |
| 245 | 100.0f, 200.0f, 300.0f, 400.0f, |
| 246 | 500.0f, 600.0f, 700.0f, 800.0f }); |
| 247 | std::vector<int32_t> outputValues({ 0, 0, |
| 248 | 0, 0, |
| 249 | 0, 0 }); |
| 250 | |
| 251 | return ArgMinMaxTestCommon<ArmnnType>(workloadFactory, memoryManager, |
| 252 | armnn::ArgMinMaxFunction::Min, |
| 253 | inputTensorInfo, outputTensorInfo, |
| 254 | inputValues, outputValues, 3); |
| 255 | } |
| 256 | |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 257 | |
| 258 | // Explicit template specializations |
| 259 | |
| 260 | template LayerTestResult<int32_t, 3> |
| 261 | ArgMaxSimpleTest<armnn::DataType::Float32>( |
| 262 | armnn::IWorkloadFactory& workloadFactory, |
| 263 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 264 | |
| 265 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 266 | ArgMaxSimpleTest<armnn::DataType::Float16>( |
| 267 | armnn::IWorkloadFactory& workloadFactory, |
| 268 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 269 | |
| 270 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 271 | ArgMaxSimpleTest<armnn::DataType::QAsymmS8>( |
| 272 | armnn::IWorkloadFactory& workloadFactory, |
| 273 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 274 | |
| 275 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 276 | ArgMaxSimpleTest<armnn::DataType::QAsymmU8>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 277 | armnn::IWorkloadFactory& workloadFactory, |
| 278 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 279 | |
| 280 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 281 | ArgMaxSimpleTest<armnn::DataType::QSymmS16>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 282 | armnn::IWorkloadFactory& workloadFactory, |
| 283 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 284 | |
| 285 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 286 | ArgMaxSimpleTest<armnn::DataType::Signed32>( |
| 287 | armnn::IWorkloadFactory& workloadFactory, |
| 288 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 289 | |
| 290 | template LayerTestResult<int32_t, 3> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 291 | ArgMinSimpleTest<armnn::DataType::Float32>( |
| 292 | armnn::IWorkloadFactory& workloadFactory, |
| 293 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 294 | |
| 295 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 296 | ArgMinSimpleTest<armnn::DataType::Float16>( |
| 297 | armnn::IWorkloadFactory& workloadFactory, |
| 298 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 299 | |
| 300 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 301 | ArgMinSimpleTest<armnn::DataType::QAsymmS8>( |
| 302 | armnn::IWorkloadFactory& workloadFactory, |
| 303 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 304 | |
| 305 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 306 | ArgMinSimpleTest<armnn::DataType::QAsymmU8>( |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 307 | armnn::IWorkloadFactory& workloadFactory, |
| 308 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 309 | |
| 310 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 311 | ArgMinSimpleTest<armnn::DataType::QSymmS16>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 312 | armnn::IWorkloadFactory& workloadFactory, |
| 313 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 314 | |
| 315 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 316 | ArgMinSimpleTest<armnn::DataType::Signed32>( |
| 317 | armnn::IWorkloadFactory& workloadFactory, |
| 318 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 319 | |
| 320 | template LayerTestResult<int32_t, 3> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 321 | ArgMinChannelTest<armnn::DataType::Float32>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 322 | armnn::IWorkloadFactory& workloadFactory, |
| 323 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 324 | |
| 325 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 326 | ArgMinChannelTest<armnn::DataType::Float16>( |
| 327 | armnn::IWorkloadFactory& workloadFactory, |
| 328 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 329 | |
| 330 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 331 | ArgMinChannelTest<armnn::DataType::QAsymmS8>( |
| 332 | armnn::IWorkloadFactory& workloadFactory, |
| 333 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 334 | |
| 335 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 336 | ArgMinChannelTest<armnn::DataType::QAsymmU8>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 337 | armnn::IWorkloadFactory& workloadFactory, |
| 338 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 339 | |
| 340 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 341 | ArgMinChannelTest<armnn::DataType::QSymmS16>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 342 | armnn::IWorkloadFactory& workloadFactory, |
| 343 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 344 | |
| 345 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 346 | ArgMinChannelTest<armnn::DataType::Signed32>( |
| 347 | armnn::IWorkloadFactory& workloadFactory, |
| 348 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 349 | |
| 350 | template LayerTestResult<int32_t, 3> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 351 | ArgMaxChannelTest<armnn::DataType::Float32>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 352 | armnn::IWorkloadFactory& workloadFactory, |
| 353 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 354 | |
| 355 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 356 | ArgMaxChannelTest<armnn::DataType::Float16>( |
| 357 | armnn::IWorkloadFactory& workloadFactory, |
| 358 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 359 | |
| 360 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 361 | ArgMaxChannelTest<armnn::DataType::QAsymmS8>( |
| 362 | armnn::IWorkloadFactory& workloadFactory, |
| 363 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 364 | |
| 365 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 366 | ArgMaxChannelTest<armnn::DataType::QAsymmU8>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 367 | armnn::IWorkloadFactory& workloadFactory, |
| 368 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 369 | |
| 370 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 371 | ArgMaxChannelTest<armnn::DataType::QSymmS16>( |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 372 | armnn::IWorkloadFactory& workloadFactory, |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 373 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 374 | |
| 375 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 376 | ArgMaxChannelTest<armnn::DataType::Signed32>( |
| 377 | armnn::IWorkloadFactory& workloadFactory, |
| 378 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 379 | |
| 380 | template LayerTestResult<int32_t, 3> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 381 | ArgMaxHeightTest<armnn::DataType::Float32>( |
| 382 | armnn::IWorkloadFactory& workloadFactory, |
| 383 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 384 | |
| 385 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 386 | ArgMaxHeightTest<armnn::DataType::Float16>( |
| 387 | armnn::IWorkloadFactory& workloadFactory, |
| 388 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 389 | |
| 390 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 391 | ArgMaxHeightTest<armnn::DataType::Signed32>( |
| 392 | armnn::IWorkloadFactory& workloadFactory, |
| 393 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 394 | |
| 395 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 396 | ArgMaxHeightTest<armnn::DataType::QAsymmS8>( |
| 397 | armnn::IWorkloadFactory& workloadFactory, |
| 398 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 399 | |
| 400 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 401 | ArgMaxHeightTest<armnn::DataType::QAsymmU8>( |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 402 | armnn::IWorkloadFactory& workloadFactory, |
| 403 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 404 | |
| 405 | template LayerTestResult<int32_t, 3> |
James Conroy | d47a064 | 2019-09-17 14:22:06 +0100 | [diff] [blame] | 406 | ArgMinWidthTest<armnn::DataType::Float32>( |
| 407 | armnn::IWorkloadFactory& workloadFactory, |
| 408 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 409 | |
| 410 | template LayerTestResult<int32_t, 3> |
Teresa Charlin | e300b36 | 2020-05-25 10:01:03 +0100 | [diff] [blame] | 411 | ArgMinWidthTest<armnn::DataType::Float16>( |
| 412 | armnn::IWorkloadFactory& workloadFactory, |
| 413 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 414 | |
| 415 | template LayerTestResult<int32_t, 3> |
Francis Murtagh | 1939df5 | 2019-11-13 15:21:09 +0000 | [diff] [blame] | 416 | ArgMinWidthTest<armnn::DataType::Signed32>( |
| 417 | armnn::IWorkloadFactory& workloadFactory, |
| 418 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 419 | |
| 420 | template LayerTestResult<int32_t, 3> |
Sadik Armagan | 303980c | 2020-04-17 12:45:14 +0100 | [diff] [blame] | 421 | ArgMinWidthTest<armnn::DataType::QAsymmS8>( |
| 422 | armnn::IWorkloadFactory& workloadFactory, |
| 423 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |
| 424 | |
| 425 | template LayerTestResult<int32_t, 3> |
Derek Lamberti | f90c56d | 2020-01-10 17:14:08 +0000 | [diff] [blame] | 426 | ArgMinWidthTest<armnn::DataType::QAsymmU8>( |
Francis Murtagh | 52ec346 | 2019-11-19 12:24:19 +0000 | [diff] [blame] | 427 | armnn::IWorkloadFactory& workloadFactory, |
| 428 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager); |