ArmNN
 20.08
PadTestImpl.cpp File Reference

Go to the source code of this file.

Functions

template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 2 > Pad2dTestCommon (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset, const float customPaddingValue)
 
template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 3 > Pad3dTestCommon (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset)
 
template<armnn::DataType ArmnnType, typename T >
LayerTestResult< T, 4 > Pad4dTestCommon (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 2 > Pad2dTestCommon< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset, const float customPaddingValue)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 3 > Pad3dTestCommon< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset)
 
template LayerTestResult< armnn::ResolveType< armnn::DataType::QSymmS16 >, 4 > Pad4dTestCommon< armnn::DataType::QSymmS16 > (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, float qScale, int32_t qOffset)
 
LayerTestResult< uint8_t, 2 > PadUint82dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< uint8_t, 2 > PadUint82dCustomPaddingTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< uint8_t, 3 > PadUint83dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< uint8_t, 4 > PadUint84dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< float, 2 > PadFloat322dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< float, 2 > PadFloat322dCustomPaddingTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< float, 3 > PadFloat323dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< float, 4 > PadFloat324dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< armnn::BFloat16, 2 > PadBFloat162dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< armnn::BFloat16, 2 > PadBFloat162dCustomPaddingTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< armnn::BFloat16, 3 > PadBFloat163dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< armnn::BFloat16, 4 > PadBFloat164dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< int8_t, 2 > PadInt82dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< int8_t, 2 > PadInt82dCustomPaddingTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< int8_t, 3 > PadInt83dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
LayerTestResult< int8_t, 4 > PadInt84dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 

Function Documentation

◆ Pad2dTestCommon()

LayerTestResult<T, 2> Pad2dTestCommon ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
float  qScale,
int32_t  qOffset,
const float  customPaddingValue 
)

Definition at line 20 of file PadTestImpl.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, CopyDataFromITensorHandle(), CopyDataToITensorHandle(), IWorkloadFactory::CreatePad(), IWorkloadFactory::CreateTensorHandle(), armnn::IgnoreUnused(), PadDescriptor::m_PadList, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

26 {
27  IgnoreUnused(memoryManager);
28  const armnn::TensorShape inputShape{ 3, 3 };
29  const armnn::TensorShape outputShape{ 7, 7 };
30 
31  const armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType, qScale, qOffset);
32  const armnn::TensorInfo outputTensorInfo(outputShape, ArmnnType, qScale, qOffset);
33 
34  std::vector<T> inputValues = armnnUtils::QuantizedVector<T>(
35  {
36  // Height (3) x Width (3)
37  4, 8, 6,
38  7, 4, 4,
39  3, 2, 4
40  },
41  qScale, qOffset);
42 
43  auto p = customPaddingValue;
44  std::vector<T> expectedOutputValues = armnnUtils::QuantizedVector<T>(
45  {
46  p, p, p, p, p, p, p,
47  p, p, p, p, p, p, p,
48  p, p, 4, 8, 6, p, p,
49  p, p, 7, 4, 4, p, p,
50  p, p, 3, 2, 4, p, p,
51  p, p, p, p, p, p, p,
52  p, p, p, p, p, p, p
53  },
54  qScale, qOffset);
55 
56  auto inputTensor = MakeTensor<T, 2>(inputTensorInfo, std::vector<T>(inputValues));
57 
58  LayerTestResult<T, 2> result(outputTensorInfo);
59  result.outputExpected = MakeTensor<T, 2>(outputTensorInfo, std::vector<T>(expectedOutputValues));
60 
62  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
63  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
65 
66  armnn::PadQueueDescriptor descriptor;
67 
68  std::vector<std::pair<unsigned int, unsigned int>> padList;
69  padList.push_back(std::pair<unsigned int, unsigned int>(2,2));
70  padList.push_back(std::pair<unsigned int, unsigned int>(2,2));
71 
72  descriptor.m_Parameters.m_PadList = padList;
73  descriptor.m_Parameters.m_PadValue = customPaddingValue;
75 
76  AddInputToWorkload(descriptor, info, inputTensorInfo, inputHandle.get());
77  AddOutputToWorkload(descriptor, info, outputTensorInfo, outputHandle.get());
78 
79  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreatePad(descriptor, info);
80 
81  inputHandle->Allocate();
82  outputHandle->Allocate();
83 
84  CopyDataToITensorHandle(inputHandle.get(), &inputTensor[0][0]);
85 
86  workload->PostAllocationConfigure();
87  workload->Execute();
88 
89  CopyDataFromITensorHandle(&result.output[0][0], outputHandle.get());
90 
91  return result;
92 }
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding for input dimension.
void IgnoreUnused(Ts &&...)
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual std::unique_ptr< IWorkload > CreatePad(const PadQueueDescriptor &descriptor, const WorkloadInfo &Info) const
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
Contains information about inputs and outputs to a layer.
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)

◆ Pad2dTestCommon< armnn::DataType::QSymmS16 >()

template LayerTestResult<armnn::ResolveType<armnn::DataType::QSymmS16>, 2> Pad2dTestCommon< armnn::DataType::QSymmS16 > ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
float  qScale,
int32_t  qOffset,
const float  customPaddingValue 
)

◆ Pad3dTestCommon()

LayerTestResult<T, 3> Pad3dTestCommon ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
float  qScale,
int32_t  qOffset 
)

Definition at line 95 of file PadTestImpl.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, CopyDataFromITensorHandle(), CopyDataToITensorHandle(), IWorkloadFactory::CreatePad(), IWorkloadFactory::CreateTensorHandle(), armnn::IgnoreUnused(), PadDescriptor::m_PadList, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

100 {
101  IgnoreUnused(memoryManager);
102  const armnn::TensorShape inputShape{ 2, 2, 2 };
103  const armnn::TensorShape outputShape{ 3, 5, 6 };
104 
105  const armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType, qScale, qOffset);
106  const armnn::TensorInfo outputTensorInfo(outputShape, ArmnnType, qScale, qOffset);
107 
108  std::vector<T> inputValues = armnnUtils::QuantizedVector<T>(
109  {
110  // Channel 0, Height (2) x Width (2)
111  0, 4,
112  2, 5,
113 
114  // Channel 1, Height (2) x Width (2)
115  6, 1,
116  5, 2
117  },
118  qScale, qOffset);
119 
120  std::vector<T> expectedOutputValues = armnnUtils::QuantizedVector<T>(
121  {
122  0, 0, 0, 0, 0, 0,
123  0, 0, 0, 0, 0, 0,
124  0, 0, 0, 4, 0, 0,
125  0, 0, 2, 5, 0, 0,
126  0, 0, 0, 0, 0, 0,
127 
128  0, 0, 0, 0, 0, 0,
129  0, 0, 0, 0, 0, 0,
130  0, 0, 6, 1, 0, 0,
131  0, 0, 5, 2, 0, 0,
132  0, 0, 0, 0, 0, 0,
133 
134  0, 0, 0, 0, 0, 0,
135  0, 0, 0, 0, 0, 0,
136  0, 0, 0, 0, 0, 0,
137  0, 0, 0, 0, 0, 0,
138  0, 0, 0, 0, 0, 0
139  },
140  qScale, qOffset);
141 
142  auto inputTensor = MakeTensor<T, 3>(inputTensorInfo, std::vector<T>(inputValues));
143 
144  LayerTestResult<T, 3> result(outputTensorInfo);
145  result.outputExpected = MakeTensor<T, 3>(outputTensorInfo, std::vector<T>(expectedOutputValues));
146 
148  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
149  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
151 
152  armnn::PadQueueDescriptor descriptor;
153 
154  std::vector<std::pair<unsigned int, unsigned int>> PadList;
155  PadList.push_back(std::pair<unsigned int, unsigned int>(0,1));
156  PadList.push_back(std::pair<unsigned int, unsigned int>(2,1));
157  PadList.push_back(std::pair<unsigned int, unsigned int>(2,2));
158 
159  descriptor.m_Parameters.m_PadList = PadList;
161 
162  AddInputToWorkload(descriptor, info, inputTensorInfo, inputHandle.get());
163  AddOutputToWorkload(descriptor, info, outputTensorInfo, outputHandle.get());
164 
165  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreatePad(descriptor, info);
166 
167  inputHandle->Allocate();
168  outputHandle->Allocate();
169 
170  CopyDataToITensorHandle(inputHandle.get(), &inputTensor[0][0][0]);
171 
172  workload->PostAllocationConfigure();
173  workload->Execute();
174 
175  CopyDataFromITensorHandle(&result.output[0][0][0], outputHandle.get());
176 
177  return result;
178 }
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding for input dimension.
void IgnoreUnused(Ts &&...)
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual std::unique_ptr< IWorkload > CreatePad(const PadQueueDescriptor &descriptor, const WorkloadInfo &Info) const
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
Contains information about inputs and outputs to a layer.
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)

◆ Pad3dTestCommon< armnn::DataType::QSymmS16 >()

◆ Pad4dTestCommon()

LayerTestResult<T, 4> Pad4dTestCommon ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
float  qScale,
int32_t  qOffset 
)

Definition at line 181 of file PadTestImpl.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, CopyDataFromITensorHandle(), CopyDataToITensorHandle(), IWorkloadFactory::CreatePad(), IWorkloadFactory::CreateTensorHandle(), armnn::IgnoreUnused(), PadDescriptor::m_PadList, QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters, LayerTestResult< T, n >::output, and LayerTestResult< T, n >::outputExpected.

186 {
187  IgnoreUnused(memoryManager);
188  const armnn::TensorShape inputShape{ 2, 2, 3, 2 };
189  const armnn::TensorShape outputShape{ 4, 5, 7, 4 };
190 
191  const armnn::TensorInfo inputTensorInfo(inputShape, ArmnnType, qScale, qOffset);
192  const armnn::TensorInfo outputTensorInfo(outputShape, ArmnnType, qScale, qOffset);
193 
194  std::vector<T> inputValues = armnnUtils::QuantizedVector<T>(
195  {
196  // Batch 0, Channel 0, Height (3) x Width (2)
197  0, 1,
198  2, 3,
199  4, 5,
200 
201  // Batch 0, Channel 1, Height (3) x Width (2)
202  6, 7,
203  8, 9,
204  10, 11,
205 
206  // Batch 1, Channel 0, Height (3) x Width (2)
207  12, 13,
208  14, 15,
209  16, 17,
210 
211  // Batch 1, Channel 1, Height (3) x Width (2)
212  18, 19,
213  20, 21,
214  22, 23
215  },
216  qScale, qOffset);
217 
218  std::vector<T> expectedOutputValues = armnnUtils::QuantizedVector<T>(
219  {
220  0, 0, 0, 0,
221  0, 0, 0, 0,
222  0, 0, 0, 0,
223  0, 0, 0, 0,
224  0, 0, 0, 0,
225  0, 0, 0, 0,
226  0, 0, 0, 0,
227 
228  0, 0, 0, 0,
229  0, 0, 0, 0,
230  0, 0, 0, 0,
231  0, 0, 0, 0,
232  0, 0, 0, 0,
233  0, 0, 0, 0,
234  0, 0, 0, 0,
235 
236  0, 0, 0, 0,
237  0, 0, 0, 0,
238  0, 0, 0, 0,
239  0, 0, 0, 0,
240  0, 0, 0, 0,
241  0, 0, 0, 0,
242  0, 0, 0, 0,
243 
244  0, 0, 0, 0,
245  0, 0, 0, 0,
246  0, 0, 0, 0,
247  0, 0, 0, 0,
248  0, 0, 0, 0,
249  0, 0, 0, 0,
250  0, 0, 0, 0,
251 
252  0, 0, 0, 0,
253  0, 0, 0, 0,
254  0, 0, 0, 0,
255  0, 0, 0, 0,
256  0, 0, 0, 0,
257  0, 0, 0, 0,
258  0, 0, 0, 0,
259 
260  0, 0, 0, 0,
261  0, 0, 0, 0,
262  0, 0, 0, 0,
263  0, 0, 0, 0,
264  0, 0, 0, 0,
265  0, 0, 0, 0,
266  0, 0, 0, 0,
267 
268  0, 0, 0, 0,
269  0, 0, 0, 0,
270  0, 0, 0, 0,
271  0, 0, 0, 0,
272  0, 0, 0, 0,
273  0, 0, 0, 0,
274  0, 0, 0, 0,
275 
276  0, 0, 0, 0,
277  0, 0, 0, 0,
278  0, 0, 0, 0,
279  0, 0, 1, 0,
280  0, 2, 3, 0,
281  0, 4, 5, 0,
282  0, 0, 0, 0,
283 
284  0, 0, 0, 0,
285  0, 0, 0, 0,
286  0, 0, 0, 0,
287  0, 6, 7, 0,
288  0, 8, 9, 0,
289  0, 10, 11, 0,
290  0, 0, 0, 0,
291 
292  0, 0, 0, 0,
293  0, 0, 0, 0,
294  0, 0, 0, 0,
295  0, 0, 0, 0,
296  0, 0, 0, 0,
297  0, 0, 0, 0,
298  0, 0, 0, 0,
299 
300  0, 0, 0, 0,
301  0, 0, 0, 0,
302  0, 0, 0, 0,
303  0, 0, 0, 0,
304  0, 0, 0, 0,
305  0, 0, 0, 0,
306  0, 0, 0, 0,
307 
308  0, 0, 0, 0,
309  0, 0, 0, 0,
310  0, 0, 0, 0,
311  0, 0, 0, 0,
312  0, 0, 0, 0,
313  0, 0, 0, 0,
314  0, 0, 0, 0,
315 
316  0, 0, 0, 0,
317  0, 0, 0, 0,
318  0, 0, 0, 0,
319  0, 12, 13, 0,
320  0, 14, 15, 0,
321  0, 16, 17, 0,
322  0, 0, 0, 0,
323 
324  0, 0, 0, 0,
325  0, 0, 0, 0,
326  0, 0, 0, 0,
327  0, 18, 19, 0,
328  0, 20, 21, 0,
329  0, 22, 23, 0,
330  0, 0, 0, 0,
331 
332  0, 0, 0, 0,
333  0, 0, 0, 0,
334  0, 0, 0, 0,
335  0, 0, 0, 0,
336  0, 0, 0, 0,
337  0, 0, 0, 0,
338  0, 0, 0, 0,
339 
340  0, 0, 0, 0,
341  0, 0, 0, 0,
342  0, 0, 0, 0,
343  0, 0, 0, 0,
344  0, 0, 0, 0,
345  0, 0, 0, 0,
346  0, 0, 0, 0,
347 
348  0, 0, 0, 0,
349  0, 0, 0, 0,
350  0, 0, 0, 0,
351  0, 0, 0, 0,
352  0, 0, 0, 0,
353  0, 0, 0, 0,
354  0, 0, 0, 0,
355 
356  0, 0, 0, 0,
357  0, 0, 0, 0,
358  0, 0, 0, 0,
359  0, 0, 0, 0,
360  0, 0, 0, 0,
361  0, 0, 0, 0,
362  0, 0, 0, 0,
363 
364  0, 0, 0, 0,
365  0, 0, 0, 0,
366  0, 0, 0, 0,
367  0, 0, 0, 0,
368  0, 0, 0, 0,
369  0, 0, 0, 0,
370  0, 0, 0, 0,
371 
372  0, 0, 0, 0,
373  0, 0, 0, 0,
374  0, 0, 0, 0,
375  0, 0, 0, 0,
376  0, 0, 0, 0,
377  0, 0, 0, 0,
378  0, 0, 0, 0
379  },
380  qScale, qOffset);
381 
382  auto inputTensor = MakeTensor<T, 4>(inputTensorInfo, std::vector<T>(inputValues));
383 
384  LayerTestResult<T, 4> result(outputTensorInfo);
385  result.outputExpected = MakeTensor<T, 4>(outputTensorInfo, std::vector<T>(expectedOutputValues));
386 
388  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
389  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
391 
392  armnn::PadQueueDescriptor descriptor;
393 
394  std::vector<std::pair<unsigned int, unsigned int>> PadList;
395  PadList.push_back(std::pair<unsigned int, unsigned int>(1,1));
396  PadList.push_back(std::pair<unsigned int, unsigned int>(2,1));
397  PadList.push_back(std::pair<unsigned int, unsigned int>(3,1));
398  PadList.push_back(std::pair<unsigned int, unsigned int>(1,1));
399 
400  descriptor.m_Parameters.m_PadList = PadList;
402 
403  AddInputToWorkload(descriptor, info, inputTensorInfo, inputHandle.get());
404  AddOutputToWorkload(descriptor, info, outputTensorInfo, outputHandle.get());
405 
406  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.CreatePad(descriptor, info);
407 
408  inputHandle->Allocate();
409  outputHandle->Allocate();
410 
411  CopyDataToITensorHandle(inputHandle.get(), &inputTensor[0][0][0][0]);
412 
413  workload->PostAllocationConfigure();
414  workload->Execute();
415 
416  CopyDataFromITensorHandle(&result.output[0][0][0][0], outputHandle.get());
417 
418  return result;
419 }
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
std::vector< std::pair< unsigned int, unsigned int > > m_PadList
Specifies the padding for input dimension.
void IgnoreUnused(Ts &&...)
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual std::unique_ptr< IWorkload > CreatePad(const PadQueueDescriptor &descriptor, const WorkloadInfo &Info) const
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
Contains information about inputs and outputs to a layer.
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)

◆ Pad4dTestCommon< armnn::DataType::QSymmS16 >()

◆ PadBFloat162dCustomPaddingTest()

LayerTestResult<armnn::BFloat16, 2> PadBFloat162dCustomPaddingTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 514 of file PadTestImpl.cpp.

517 {
518  return Pad2dTestCommon<armnn::DataType::BFloat16>(workloadFactory, memoryManager, 0.0f, 0, 1.0f);
519 }

◆ PadBFloat162dTest()

LayerTestResult<armnn::BFloat16, 2> PadBFloat162dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 507 of file PadTestImpl.cpp.

510 {
511  return Pad2dTestCommon<armnn::DataType::BFloat16>(workloadFactory, memoryManager, 0.0f, 0);
512 }

◆ PadBFloat163dTest()

LayerTestResult<armnn::BFloat16, 3> PadBFloat163dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 521 of file PadTestImpl.cpp.

524 {
525  return Pad3dTestCommon<armnn::DataType::BFloat16>(workloadFactory, memoryManager, 0.0f, 0);
526 }

◆ PadBFloat164dTest()

LayerTestResult<armnn::BFloat16, 4> PadBFloat164dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 528 of file PadTestImpl.cpp.

531 {
532  return Pad4dTestCommon<armnn::DataType::BFloat16>(workloadFactory, memoryManager, 0.0f, 0);
533 }

◆ PadFloat322dCustomPaddingTest()

LayerTestResult<float, 2> PadFloat322dCustomPaddingTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 486 of file PadTestImpl.cpp.

489 {
490  return Pad2dTestCommon<armnn::DataType::Float32>(workloadFactory, memoryManager, 0.0f, 0, 1.0f);
491 }

◆ PadFloat322dTest()

LayerTestResult<float, 2> PadFloat322dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 479 of file PadTestImpl.cpp.

482 {
483  return Pad2dTestCommon<armnn::DataType::Float32>(workloadFactory, memoryManager, 0.0f, 0);
484 }

◆ PadFloat323dTest()

LayerTestResult<float, 3> PadFloat323dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 493 of file PadTestImpl.cpp.

496 {
497  return Pad3dTestCommon<armnn::DataType::Float32>(workloadFactory, memoryManager, 0.0f, 0);
498 }

◆ PadFloat324dTest()

LayerTestResult<float, 4> PadFloat324dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 500 of file PadTestImpl.cpp.

503 {
504  return Pad4dTestCommon<armnn::DataType::Float32>(workloadFactory, memoryManager, 0.0f, 0);
505 }

◆ PadInt82dCustomPaddingTest()

LayerTestResult<int8_t, 2> PadInt82dCustomPaddingTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 542 of file PadTestImpl.cpp.

545 {
546  return Pad2dTestCommon<armnn::DataType::QSymmS8>(workloadFactory, memoryManager, 1.0f, 0, 1.0f);
547 }

◆ PadInt82dTest()

LayerTestResult<int8_t, 2> PadInt82dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 535 of file PadTestImpl.cpp.

538 {
539  return Pad2dTestCommon<armnn::DataType::QSymmS8>(workloadFactory, memoryManager, 1.0f, 0);
540 }

◆ PadInt83dTest()

LayerTestResult<int8_t, 3> PadInt83dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 549 of file PadTestImpl.cpp.

552 {
553  return Pad3dTestCommon<armnn::DataType::QSymmS8>(workloadFactory, memoryManager, 1.0f, 0);
554 }

◆ PadInt84dTest()

LayerTestResult<int8_t, 4> PadInt84dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 556 of file PadTestImpl.cpp.

559 {
560  return Pad4dTestCommon<armnn::DataType::QSymmS8>(workloadFactory, memoryManager, 1.0f, 0);
561 }

◆ PadUint82dCustomPaddingTest()

LayerTestResult<uint8_t, 2> PadUint82dCustomPaddingTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 458 of file PadTestImpl.cpp.

461 {
462  return Pad2dTestCommon<armnn::DataType::QAsymmU8>(workloadFactory, memoryManager, 1.0f, 0, 1.0f);
463 }

◆ PadUint82dTest()

LayerTestResult<uint8_t, 2> PadUint82dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 451 of file PadTestImpl.cpp.

454 {
455  return Pad2dTestCommon<armnn::DataType::QAsymmU8>(workloadFactory, memoryManager, 1.0f, 0);
456 }

◆ PadUint83dTest()

LayerTestResult<uint8_t, 3> PadUint83dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 465 of file PadTestImpl.cpp.

468 {
469  return Pad3dTestCommon<armnn::DataType::QAsymmU8>(workloadFactory, memoryManager, 1.0f, 0);
470 }

◆ PadUint84dTest()

LayerTestResult<uint8_t, 4> PadUint84dTest ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager 
)

Definition at line 472 of file PadTestImpl.cpp.

475 {
476  return Pad4dTestCommon<armnn::DataType::QAsymmU8>(workloadFactory, memoryManager, 1.0f, 0);
477 }