Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 1 | // |
Teresa Charlin | fbf0e5b | 2020-08-17 01:01:06 +0100 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include "SpaceToBatchNdTestImpl.hpp" |
| 7 | |
Aron Virginas-Tar | 48623a0 | 2019-10-22 10:00:28 +0100 | [diff] [blame] | 8 | #include <QuantizeHelper.hpp> |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 9 | #include <ResolveType.hpp> |
| 10 | |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 11 | |
Matteo Martincigh | e011d20 | 2019-11-28 11:35:47 +0000 | [diff] [blame] | 12 | #include <armnnUtils/Permute.hpp> |
| 13 | |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 14 | #include <backendsCommon/test/TensorCopyUtils.hpp> |
| 15 | #include <backendsCommon/test/WorkloadTestUtils.hpp> |
| 16 | |
| 17 | #include <test/TensorHelpers.hpp> |
| 18 | |
| 19 | namespace |
| 20 | { |
| 21 | |
| 22 | template<typename T> |
| 23 | LayerTestResult<T, 4> SpaceToBatchNdTestImpl( |
| 24 | armnn::IWorkloadFactory& workloadFactory, |
| 25 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 26 | armnn::ITensorHandleFactory* tensorHandleFactory, |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 27 | armnn::TensorInfo& inputTensorInfo, |
| 28 | armnn::TensorInfo& outputTensorInfo, |
| 29 | std::vector<float>& inputData, |
| 30 | std::vector<float>& outputExpectedData, |
| 31 | armnn::SpaceToBatchNdQueueDescriptor descriptor, |
| 32 | const float qScale = 1.0f, |
| 33 | const int32_t qOffset = 0) |
| 34 | { |
Jan Eilers | 8eb2560 | 2020-03-09 12:13:48 +0000 | [diff] [blame] | 35 | IgnoreUnused(memoryManager); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 36 | const armnn::PermutationVector NCHWToNHWC = {0, 3, 1, 2}; |
| 37 | if (descriptor.m_Parameters.m_DataLayout == armnn::DataLayout::NHWC) |
| 38 | { |
| 39 | inputTensorInfo = armnnUtils::Permuted(inputTensorInfo, NCHWToNHWC); |
| 40 | outputTensorInfo = armnnUtils::Permuted(outputTensorInfo, NCHWToNHWC); |
| 41 | |
| 42 | std::vector<float> inputTmp(inputData.size()); |
| 43 | armnnUtils::Permute(inputTensorInfo.GetShape(), NCHWToNHWC, |
| 44 | inputData.data(), inputTmp.data(), sizeof(float)); |
| 45 | inputData = inputTmp; |
| 46 | |
| 47 | std::vector<float> outputTmp(outputExpectedData.size()); |
| 48 | armnnUtils::Permute(outputTensorInfo.GetShape(), NCHWToNHWC, |
| 49 | outputExpectedData.data(), outputTmp.data(), sizeof(float)); |
| 50 | outputExpectedData = outputTmp; |
| 51 | } |
| 52 | |
| 53 | if(armnn::IsQuantizedType<T>()) |
| 54 | { |
| 55 | inputTensorInfo.SetQuantizationScale(qScale); |
| 56 | inputTensorInfo.SetQuantizationOffset(qOffset); |
| 57 | outputTensorInfo.SetQuantizationScale(qScale); |
| 58 | outputTensorInfo.SetQuantizationOffset(qOffset); |
| 59 | } |
| 60 | |
Aron Virginas-Tar | 48623a0 | 2019-10-22 10:00:28 +0100 | [diff] [blame] | 61 | boost::multi_array<T, 4> input = MakeTensor<T, 4>(inputTensorInfo, |
| 62 | armnnUtils::QuantizedVector<T>(inputData, qScale, qOffset)); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 63 | |
| 64 | LayerTestResult<T, 4> ret(outputTensorInfo); |
Aron Virginas-Tar | 48623a0 | 2019-10-22 10:00:28 +0100 | [diff] [blame] | 65 | ret.outputExpected = MakeTensor<T, 4>(outputTensorInfo, |
| 66 | armnnUtils::QuantizedVector<T>(outputExpectedData, qScale, qOffset)); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 67 | |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 68 | std::unique_ptr<armnn::ITensorHandle> inputHandle = tensorHandleFactory->CreateTensorHandle(inputTensorInfo); |
| 69 | std::unique_ptr<armnn::ITensorHandle> outputHandle = tensorHandleFactory->CreateTensorHandle(outputTensorInfo); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 70 | |
| 71 | armnn::WorkloadInfo info; |
| 72 | AddInputToWorkload(descriptor, info, inputTensorInfo, inputHandle.get()); |
| 73 | AddOutputToWorkload(descriptor, info, outputTensorInfo, outputHandle.get()); |
| 74 | |
| 75 | std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreateSpaceToBatchNd(descriptor, info); |
| 76 | |
| 77 | inputHandle->Allocate(); |
| 78 | outputHandle->Allocate(); |
| 79 | |
| 80 | CopyDataToITensorHandle(inputHandle.get(), &input[0][0][0][0]); |
| 81 | |
| 82 | workload->Execute(); |
| 83 | |
| 84 | CopyDataFromITensorHandle(&ret.output[0][0][0][0], outputHandle.get()); |
| 85 | |
| 86 | return ret; |
| 87 | } |
| 88 | |
| 89 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 90 | LayerTestResult<T, 4> SpaceToBatchNdSimpleTest( |
| 91 | armnn::IWorkloadFactory& workloadFactory, |
| 92 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 93 | armnn::ITensorHandleFactory* tensorHandleFactory, |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 94 | armnn::DataLayout dataLayout = armnn::DataLayout::NCHW) |
| 95 | { |
| 96 | armnn::TensorInfo inputTensorInfo; |
| 97 | armnn::TensorInfo outputTensorInfo; |
| 98 | |
| 99 | unsigned int inputShape[] = {1, 1, 2, 2}; |
| 100 | unsigned int outputShape[] = {4, 1, 1, 1}; |
| 101 | |
| 102 | armnn::SpaceToBatchNdQueueDescriptor desc; |
| 103 | desc.m_Parameters.m_DataLayout = dataLayout; |
| 104 | desc.m_Parameters.m_BlockShape = {2, 2}; |
| 105 | desc.m_Parameters.m_PadList = {{0, 0}, {0, 0}}; |
| 106 | |
| 107 | inputTensorInfo = armnn::TensorInfo(4, inputShape, ArmnnType); |
| 108 | outputTensorInfo = armnn::TensorInfo(4, outputShape, ArmnnType); |
| 109 | |
| 110 | std::vector<float> input = std::vector<float>( |
| 111 | { |
| 112 | 1.0f, 2.0f, 3.0f, 4.0f |
| 113 | }); |
| 114 | |
| 115 | std::vector<float> outputExpected = std::vector<float>( |
| 116 | { |
| 117 | 1.0f, 2.0f, 3.0f, 4.0f |
| 118 | }); |
| 119 | |
| 120 | return SpaceToBatchNdTestImpl<T>( |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 121 | workloadFactory, memoryManager, tensorHandleFactory, |
| 122 | inputTensorInfo, outputTensorInfo, input, outputExpected, desc); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 126 | LayerTestResult<T, 4> SpaceToBatchNdMultiChannelsTest( |
| 127 | armnn::IWorkloadFactory& workloadFactory, |
| 128 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 129 | armnn::ITensorHandleFactory* tensorHandleFactory, |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 130 | armnn::DataLayout dataLayout = armnn::DataLayout::NCHW) |
| 131 | { |
| 132 | armnn::TensorInfo inputTensorInfo; |
| 133 | armnn::TensorInfo outputTensorInfo; |
| 134 | |
| 135 | unsigned int inputShape[] = {1, 3, 2, 2}; |
| 136 | unsigned int outputShape[] = {4, 3, 1, 1}; |
| 137 | |
| 138 | armnn::SpaceToBatchNdQueueDescriptor desc; |
| 139 | desc.m_Parameters.m_DataLayout = dataLayout; |
| 140 | desc.m_Parameters.m_BlockShape = {2, 2}; |
| 141 | desc.m_Parameters.m_PadList = {{0, 0}, {0, 0}}; |
| 142 | |
| 143 | inputTensorInfo = armnn::TensorInfo(4, inputShape, ArmnnType); |
| 144 | outputTensorInfo = armnn::TensorInfo(4, outputShape, ArmnnType); |
| 145 | |
| 146 | std::vector<float> input = std::vector<float>( |
| 147 | { |
| 148 | 1.0f, 4.0f, 7.0f, 10.0f, |
| 149 | 2.0f, 5.0, 8.0, 11.0f, |
| 150 | 3.0f, 6.0f, 9.0f, 12.0f |
| 151 | }); |
| 152 | |
| 153 | std::vector<float> outputExpected = std::vector<float>( |
| 154 | { |
| 155 | 1.0f, 2.0f, 3.0f, |
| 156 | 4.0f, 5.0f, 6.0f, |
| 157 | 7.0f, 8.0f, 9.0f, |
| 158 | 10.0f, 11.0f, 12.0f |
| 159 | }); |
| 160 | |
| 161 | return SpaceToBatchNdTestImpl<T>( |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 162 | workloadFactory, memoryManager, tensorHandleFactory, |
| 163 | inputTensorInfo, outputTensorInfo, input, outputExpected, desc); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 167 | LayerTestResult<T, 4> SpaceToBatchNdMultiBlockTest( |
| 168 | armnn::IWorkloadFactory& workloadFactory, |
| 169 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 170 | armnn::ITensorHandleFactory* tensorHandleFactory, |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 171 | armnn::DataLayout dataLayout = armnn::DataLayout::NCHW) |
| 172 | { |
| 173 | armnn::TensorInfo inputTensorInfo; |
| 174 | armnn::TensorInfo outputTensorInfo; |
| 175 | |
| 176 | unsigned int inputShape[] = {1, 1, 4, 4}; |
| 177 | unsigned int outputShape[] = {4, 1, 2, 2}; |
| 178 | |
| 179 | armnn::SpaceToBatchNdQueueDescriptor desc; |
| 180 | desc.m_Parameters.m_DataLayout = dataLayout; |
| 181 | desc.m_Parameters.m_BlockShape = {2, 2}; |
| 182 | desc.m_Parameters.m_PadList = {{0, 0}, {0, 0}}; |
| 183 | |
| 184 | inputTensorInfo = armnn::TensorInfo(4, inputShape, ArmnnType); |
| 185 | outputTensorInfo = armnn::TensorInfo(4, outputShape, ArmnnType); |
| 186 | |
| 187 | std::vector<float> input = std::vector<float>( |
| 188 | { |
| 189 | 1.0f, 2.0f, 3.0f, 4.0f, |
| 190 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 191 | 9.0f, 10.0f, 11.0f, 12.0f, |
| 192 | 13.0f, 14.0f, 15.0f, 16.0f |
| 193 | }); |
| 194 | |
| 195 | std::vector<float> outputExpected = std::vector<float>( |
| 196 | { |
| 197 | 1.0f, 3.0f, 9.0f, 11.0f, |
| 198 | 2.0f, 4.0f, 10.0f, 12.0f, |
| 199 | 5.0f, 7.0f, 13.0f, 15.0f, |
| 200 | 6.0f, 8.0f, 14.0f, 16.0f |
| 201 | }); |
| 202 | |
| 203 | return SpaceToBatchNdTestImpl<T>( |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 204 | workloadFactory, memoryManager, tensorHandleFactory, |
| 205 | inputTensorInfo, outputTensorInfo, input, outputExpected, desc); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 209 | LayerTestResult<T, 4> SpaceToBatchNdPaddingTest( |
| 210 | armnn::IWorkloadFactory& workloadFactory, |
| 211 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 212 | armnn::ITensorHandleFactory* tensorHandleFactory, |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 213 | armnn::DataLayout dataLayout = armnn::DataLayout::NCHW) |
| 214 | { |
| 215 | armnn::TensorInfo inputTensorInfo; |
| 216 | armnn::TensorInfo outputTensorInfo; |
| 217 | |
| 218 | unsigned int inputShape[] = {2, 1, 2, 4}; |
| 219 | unsigned int outputShape[] = {8, 1, 1, 3}; |
| 220 | |
| 221 | armnn::SpaceToBatchNdQueueDescriptor desc; |
| 222 | desc.m_Parameters.m_DataLayout = dataLayout; |
| 223 | desc.m_Parameters.m_BlockShape = {2, 2}; |
| 224 | desc.m_Parameters.m_PadList = {{0, 0}, {2, 0}}; |
| 225 | |
| 226 | inputTensorInfo = armnn::TensorInfo(4, inputShape, ArmnnType); |
| 227 | outputTensorInfo = armnn::TensorInfo(4, outputShape, ArmnnType); |
| 228 | |
| 229 | std::vector<float> input = std::vector<float>( |
| 230 | { |
| 231 | 1.0f, 2.0f, 3.0f, 4.0f, |
| 232 | 5.0f, 6.0f, 7.0f, 8.0f, |
| 233 | 9.0f, 10.0f, 11.0f, 12.0f, |
| 234 | 13.0f, 14.0f, 15.0f, 16.0f |
| 235 | }); |
| 236 | |
| 237 | std::vector<float> outputExpected = std::vector<float>( |
| 238 | { |
| 239 | 0.0f, 1.0f, 3.0f, |
| 240 | 0.0f, 9.0f, 11.0f, |
| 241 | 0.0f, 2.0f, 4.0f, |
| 242 | 0.0f, 10.0f, 12.0f, |
| 243 | 0.0f, 5.0f, 7.0f, |
| 244 | 0.0f, 13.0f, 15.0f, |
| 245 | 0.0f, 6.0f, 8.0f, |
| 246 | 0.0f, 14.0f, 16.0f |
| 247 | }); |
| 248 | |
| 249 | return SpaceToBatchNdTestImpl<T>( |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 250 | workloadFactory, memoryManager, tensorHandleFactory, |
| 251 | inputTensorInfo, outputTensorInfo, input, outputExpected, desc); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 252 | } |
| 253 | |
| 254 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 255 | LayerTestResult<T, 4> SpaceToBatchNdSimpleNhwcTest( |
| 256 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 257 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 258 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 259 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 260 | return SpaceToBatchNdSimpleTest<ArmnnType>(workloadFactory, |
| 261 | memoryManager, |
| 262 | tensorHandleFactory, |
| 263 | armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 264 | } |
| 265 | |
| 266 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 267 | LayerTestResult<T, 4> SpaceToBatchNdMultiChannelsNhwcTest( |
| 268 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 269 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 270 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 271 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 272 | return SpaceToBatchNdMultiChannelsTest<ArmnnType>(workloadFactory, |
| 273 | memoryManager, |
| 274 | tensorHandleFactory, |
| 275 | armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 276 | } |
| 277 | |
| 278 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 279 | LayerTestResult<T, 4> SpaceToBatchNdMultiBlockNhwcTest( |
| 280 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 281 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 282 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 283 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 284 | return SpaceToBatchNdMultiBlockTest<ArmnnType>(workloadFactory, |
| 285 | memoryManager, |
| 286 | tensorHandleFactory, |
| 287 | armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> |
| 291 | LayerTestResult<T, 4> SpaceToBatchNdPaddingNhwcTest( |
| 292 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 293 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 294 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 295 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 296 | return SpaceToBatchNdPaddingTest<ArmnnType>(workloadFactory, |
| 297 | memoryManager, |
| 298 | tensorHandleFactory, |
| 299 | armnn::DataLayout::NHWC); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 300 | } |
| 301 | |
| 302 | } // anonymous namespace |
| 303 | |
| 304 | LayerTestResult<float, 4> SpaceToBatchNdSimpleFloat32Test( |
| 305 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 306 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 307 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 308 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 309 | return SpaceToBatchNdSimpleTest<armnn::DataType::Float32>(workloadFactory, |
| 310 | memoryManager, |
| 311 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 312 | } |
| 313 | |
| 314 | LayerTestResult<float, 4> SpaceToBatchNdMultiChannelsFloat32Test( |
| 315 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 316 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 317 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 318 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 319 | return SpaceToBatchNdMultiChannelsTest<armnn::DataType::Float32>(workloadFactory, |
| 320 | memoryManager, |
| 321 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 322 | } |
| 323 | |
| 324 | LayerTestResult<float, 4> SpaceToBatchNdMultiBlockFloat32Test( |
| 325 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 326 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 327 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 328 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 329 | return SpaceToBatchNdMultiBlockTest<armnn::DataType::Float32>(workloadFactory, |
| 330 | memoryManager, |
| 331 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | LayerTestResult<float, 4> SpaceToBatchNdPaddingFloat32Test( |
| 335 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 336 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 337 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 338 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 339 | return SpaceToBatchNdPaddingTest<armnn::DataType::Float32>(workloadFactory, |
| 340 | memoryManager, |
| 341 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 342 | } |
| 343 | |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 344 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdSimpleFloat16Test( |
| 345 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 346 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 347 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 348 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 349 | return SpaceToBatchNdSimpleTest<armnn::DataType::Float16>(workloadFactory, |
| 350 | memoryManager, |
| 351 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdMultiChannelsFloat16Test( |
| 355 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 356 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 357 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 358 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 359 | return SpaceToBatchNdMultiChannelsTest<armnn::DataType::Float16>(workloadFactory, |
| 360 | memoryManager, |
| 361 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 362 | } |
| 363 | |
| 364 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdMultiBlockFloat16Test( |
| 365 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 366 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 367 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 368 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 369 | return SpaceToBatchNdMultiBlockTest<armnn::DataType::Float16>(workloadFactory, |
| 370 | memoryManager, |
| 371 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 372 | } |
| 373 | |
| 374 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdPaddingFloat16Test( |
| 375 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 376 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 377 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 378 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 379 | return SpaceToBatchNdPaddingTest<armnn::DataType::Float16>(workloadFactory, |
| 380 | memoryManager, |
| 381 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 382 | } |
| 383 | |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 384 | LayerTestResult<uint8_t, 4> SpaceToBatchNdSimpleUint8Test( |
| 385 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 386 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 387 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 388 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 389 | return SpaceToBatchNdSimpleTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 390 | memoryManager, |
| 391 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 392 | } |
| 393 | |
| 394 | LayerTestResult<uint8_t, 4> SpaceToBatchNdMultiChannelsUint8Test( |
| 395 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 396 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 397 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 398 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 399 | return SpaceToBatchNdMultiChannelsTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 400 | memoryManager, |
| 401 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 402 | } |
| 403 | |
| 404 | LayerTestResult<uint8_t, 4> SpaceToBatchNdMultiBlockUint8Test( |
| 405 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 406 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 407 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 408 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 409 | return SpaceToBatchNdMultiBlockTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 410 | memoryManager, |
| 411 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 412 | } |
| 413 | |
| 414 | LayerTestResult<uint8_t, 4> SpaceToBatchNdPaddingUint8Test( |
| 415 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 416 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 417 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 418 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 419 | return SpaceToBatchNdPaddingTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 420 | memoryManager, |
| 421 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 422 | } |
| 423 | |
| 424 | LayerTestResult<float, 4> SpaceToBatchNdSimpleNhwcFloat32Test( |
| 425 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 426 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 427 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 428 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 429 | return SpaceToBatchNdSimpleNhwcTest<armnn::DataType::Float32>(workloadFactory, |
| 430 | memoryManager, |
| 431 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 432 | } |
| 433 | |
| 434 | LayerTestResult<float, 4> SpaceToBatchNdMultiChannelsNhwcFloat32Test( |
| 435 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 436 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 437 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 438 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 439 | return SpaceToBatchNdMultiChannelsNhwcTest<armnn::DataType::Float32>(workloadFactory, |
| 440 | memoryManager, |
| 441 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 442 | } |
| 443 | |
| 444 | LayerTestResult<float, 4> SpaceToBatchNdMultiBlockNhwcFloat32Test( |
| 445 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 446 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 447 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 448 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 449 | return SpaceToBatchNdMultiBlockNhwcTest<armnn::DataType::Float32>(workloadFactory, |
| 450 | memoryManager, |
| 451 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 452 | } |
| 453 | |
| 454 | LayerTestResult<float, 4> SpaceToBatchNdPaddingNhwcFloat32Test( |
| 455 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 456 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 457 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 458 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 459 | return SpaceToBatchNdPaddingNhwcTest<armnn::DataType::Float32>(workloadFactory, |
| 460 | memoryManager, |
| 461 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 462 | } |
| 463 | |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 464 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdSimpleNhwcFloat16Test( |
| 465 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 466 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 467 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 468 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 469 | return SpaceToBatchNdSimpleNhwcTest<armnn::DataType::Float16>(workloadFactory, |
| 470 | memoryManager, |
| 471 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 472 | } |
| 473 | |
| 474 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdMultiChannelsNhwcFloat16Test( |
| 475 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 476 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 477 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 478 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 479 | return SpaceToBatchNdMultiChannelsNhwcTest<armnn::DataType::Float16>(workloadFactory, |
| 480 | memoryManager, |
| 481 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 482 | } |
| 483 | |
| 484 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdMultiBlockNhwcFloat16Test( |
| 485 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 486 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 487 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 488 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 489 | return SpaceToBatchNdMultiBlockNhwcTest<armnn::DataType::Float16>(workloadFactory, |
| 490 | memoryManager, |
| 491 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 492 | } |
| 493 | |
| 494 | LayerTestResult<armnn::Half, 4> SpaceToBatchNdPaddingNhwcFloat16Test( |
| 495 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 496 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 497 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 498 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 499 | return SpaceToBatchNdPaddingNhwcTest<armnn::DataType::Float16>(workloadFactory, |
| 500 | memoryManager, |
| 501 | tensorHandleFactory); |
Matthew Jackson | 9bff144 | 2019-09-12 09:08:23 +0100 | [diff] [blame] | 502 | } |
| 503 | |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 504 | LayerTestResult<uint8_t, 4> SpaceToBatchNdSimpleNhwcUint8Test( |
| 505 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 506 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 507 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 508 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 509 | return SpaceToBatchNdSimpleNhwcTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 510 | memoryManager, |
| 511 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 512 | } |
| 513 | |
| 514 | LayerTestResult<uint8_t, 4> SpaceToBatchNdMultiChannelsNhwcUint8Test( |
| 515 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 516 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 517 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 518 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 519 | return SpaceToBatchNdMultiChannelsNhwcTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 520 | memoryManager, |
| 521 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 522 | } |
| 523 | |
| 524 | LayerTestResult<uint8_t, 4> SpaceToBatchNdMultiBlockNhwcUint8Test( |
| 525 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 526 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 527 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 528 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 529 | return SpaceToBatchNdMultiBlockNhwcTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 530 | memoryManager, |
| 531 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 532 | } |
| 533 | |
| 534 | LayerTestResult<uint8_t, 4> SpaceToBatchNdPaddingNhwcUint8Test( |
| 535 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 536 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 537 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 538 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 539 | return SpaceToBatchNdPaddingNhwcTest<armnn::DataType::QAsymmU8>(workloadFactory, |
| 540 | memoryManager, |
| 541 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 542 | } |
| 543 | |
| 544 | LayerTestResult<int16_t, 4> SpaceToBatchNdSimpleUint16Test( |
| 545 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 546 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 547 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 548 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 549 | return SpaceToBatchNdSimpleTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 550 | memoryManager, |
| 551 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 552 | } |
| 553 | |
| 554 | LayerTestResult<int16_t, 4> SpaceToBatchNdMultiChannelsUint16Test( |
| 555 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 556 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 557 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 558 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 559 | return SpaceToBatchNdMultiChannelsTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 560 | memoryManager, |
| 561 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 562 | } |
| 563 | |
| 564 | LayerTestResult<int16_t, 4> SpaceToBatchNdMultiBlockUint16Test( |
| 565 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 566 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 567 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 568 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 569 | return SpaceToBatchNdMultiBlockTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 570 | memoryManager, |
| 571 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 572 | } |
| 573 | |
| 574 | LayerTestResult<int16_t, 4> SpaceToBatchNdPaddingUint16Test( |
| 575 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 576 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 577 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 578 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 579 | return SpaceToBatchNdPaddingTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 580 | memoryManager, |
| 581 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 582 | } |
| 583 | |
| 584 | LayerTestResult<int16_t, 4> SpaceToBatchNdSimpleNhwcUint16Test( |
| 585 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 586 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 587 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 588 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 589 | return SpaceToBatchNdSimpleNhwcTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 590 | memoryManager, |
| 591 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 592 | } |
| 593 | |
| 594 | LayerTestResult<int16_t, 4> SpaceToBatchNdMultiChannelsNhwcUint16Test( |
| 595 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 596 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 597 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 598 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 599 | return SpaceToBatchNdMultiChannelsNhwcTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 600 | memoryManager, |
| 601 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 602 | } |
| 603 | |
| 604 | LayerTestResult<int16_t, 4> SpaceToBatchNdMultiBlockNhwcUint16Test( |
| 605 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 606 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 607 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 608 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 609 | return SpaceToBatchNdMultiBlockNhwcTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 610 | memoryManager, |
| 611 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 612 | } |
| 613 | |
| 614 | LayerTestResult<int16_t, 4> SpaceToBatchNdPaddingNhwcUint16Test( |
| 615 | armnn::IWorkloadFactory& workloadFactory, |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 616 | const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, |
| 617 | armnn::ITensorHandleFactory* tensorHandleFactory) |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 618 | { |
Sadik Armagan | 714fe5b | 2020-08-27 12:46:36 +0100 | [diff] [blame] | 619 | return SpaceToBatchNdPaddingNhwcTest<armnn::DataType::QSymmS16>(workloadFactory, |
| 620 | memoryManager, |
| 621 | tensorHandleFactory); |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 622 | } |