11 std::unique_ptr<armnn::IWorkload> CreateWorkload<armnn::DivisionQueueDescriptor>(
25 const unsigned int width = 2u;
26 const unsigned int height = 2u;
27 const unsigned int channelCount = 2u;
28 const unsigned int batchSize = 2u;
30 unsigned int shape[] = { batchSize, channelCount, height, width };
32 std::vector<float> input0 =
34 1.f, 1.f, 1.f, 1.f, 0.f, 0.f, 0.f, 0.f,
35 -1.f, -1.f, -1.f, -1.f, 5.f, 5.f, 5.f, 5.f
38 std::vector<float> input1 =
40 0.f, 0.f, -0.f, -0.f, 0.f, 0.f, -0.f, -0.f,
41 0.f, 0.f, -0.f, -0.f, 5.f, 5.f, 5.f, 5.f
44 std::vector<float> output =
46 INFINITY, INFINITY, -INFINITY, -INFINITY, NAN, NAN, -NAN, -NAN,
47 -INFINITY, -INFINITY, INFINITY, INFINITY, 1, 1, 1, 1
50 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float32>(
67 const unsigned int width = 2u;
68 const unsigned int height = 2u;
69 const unsigned int channelCount = 2u;
70 const unsigned int batchSize = 2u;
72 unsigned int shape[] = { batchSize, channelCount, height, width };
74 std::vector<float> input0 =
76 2.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f, 3.f,
77 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f
80 std::vector<float> input1 =
82 1.f, 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f,
83 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f, 4.f
86 std::vector<float> output =
88 2.f, 2.f, 2.f, 2.f, 1.50f, 1.50f, 1.50f, 1.50f,
89 1.f, 1.f, 1.f, 1.f, 1.25f, 1.25f, 1.25f, 1.25f
92 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float32>(
101 tensorHandleFactory);
109 unsigned int shape0[] = { 1, 2, 2, 2 };
110 unsigned int shape1[] = { 1, 1, 1, 1 };
112 std::vector<float> input0({ 2, 4, 6, 8, 10, 12, 14, 16});
114 std::vector<float> input1({ 2 });
116 std::vector<float> output({ 1, 2, 3, 4, 5, 6, 7, 8});
118 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float32>(
127 tensorHandleFactory);
135 unsigned int shape0[] = { 1, 3, 3, 2 };
136 unsigned int shape1[] = { 1, 1, 1, 2 };
138 std::vector<float> input0 =
140 1.f, 4.f, 3.f, 8.f, 5.f, 12.f,
141 7.f, 16.f, 9.f, 20.f, 11.f, 24.f,
142 13.f, 28.f, 15.f, 32.f, 17.f, 36.f
145 std::vector<float> input1 = { 1.f, 2.f };
147 std::vector<float> output =
149 1.f, 2.f, 3.f, 4.f, 5.f, 6.f,
150 7.f, 8.f, 9.f, 10.f, 11.f, 12.f,
151 13.f, 14.f, 15.f, 16.f, 17.f, 18.f
154 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float32>(
163 tensorHandleFactory);
171 using namespace half_float::literal;
173 const unsigned int width = 2u;
174 const unsigned int height = 2u;
175 const unsigned int channelCount = 2u;
176 const unsigned int batchSize = 2u;
178 unsigned int shape[] = { batchSize, channelCount, height, width };
180 std::vector<armnn::Half> input0 =
182 2._h, 2._h, 2._h, 2._h, 3._h, 3._h, 3._h, 3._h,
183 4._h, 4._h, 4._h, 4._h, 5._h, 5._h, 5._h, 5._h
186 std::vector<armnn::Half> input1 =
188 1._h, 1._h, 1._h, 1._h, 2._h, 2._h, 2._h, 2._h,
189 4._h, 4._h, 4._h, 4._h, 4._h, 4._h, 4._h, 4._h
192 std::vector<armnn::Half> output =
194 2._h, 2._h, 2._h, 2._h, 1.50_h, 1.50_h, 1.50_h, 1.50_h,
195 1._h, 1._h, 1._h, 1._h, 1.25_h, 1.25_h, 1.25_h, 1.25_h
198 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float16>(
207 tensorHandleFactory);
215 using namespace half_float::literal;
217 unsigned int shape0[] = { 1, 2, 2, 2 };
218 unsigned int shape1[] = { 1, 1, 1, 1 };
220 std::vector<armnn::Half> input0({ 2._h, 4._h, 6._h, 8._h, 10._h, 12._h, 14._h, 16._h});
222 std::vector<armnn::Half> input1({ 2._h });
224 std::vector<armnn::Half> output({ 1._h, 2._h, 3._h, 4._h, 5._h, 6._h, 7._h, 8._h});
226 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float16>(
235 tensorHandleFactory);
243 using namespace half_float::literal;
245 unsigned int shape0[] = { 1, 3, 3, 2 };
246 unsigned int shape1[] = { 1, 1, 1, 2 };
248 std::vector<armnn::Half> input0 =
250 1._h, 4._h, 3._h, 8._h, 5._h, 12._h,
251 7._h, 16._h, 9._h, 20._h, 11._h, 24._h,
252 13._h, 28._h, 15._h, 32._h, 17._h, 36._h
255 std::vector<armnn::Half> input1 = { 1._h, 2._h };
257 std::vector<armnn::Half> output =
259 1._h, 2._h, 3._h, 4._h, 5._h, 6._h,
260 7._h, 8._h, 9._h, 10._h, 11._h, 12._h,
261 13._h, 14._h, 15._h, 16._h, 17._h, 18._h
264 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Float16>(
273 tensorHandleFactory);
281 const unsigned int width = 2u;
282 const unsigned int height = 2u;
283 const unsigned int channelCount = 2u;
284 const unsigned int batchSize = 2u;
286 unsigned int shape[] = { batchSize, channelCount, height, width };
288 std::vector<uint8_t> input0 =
290 2, 2, 2, 2, 3, 3, 3, 3,
291 4, 4, 4, 4, 5, 5, 5, 5
294 std::vector<uint8_t> input1 =
296 1, 1, 1, 1, 2, 2, 2, 2,
297 4, 4, 4, 4, 4, 4, 4, 4
300 std::vector<uint8_t> output =
302 8, 8, 8, 8, 6, 6, 6, 6,
303 4, 4, 4, 4, 5, 5, 5, 5
306 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QAsymmU8>(
325 unsigned int shape0[] = { 1, 2, 2, 2 };
326 unsigned int shape1[] = { 1, 1, 1, 1 };
328 std::vector<uint8_t> input0 = { 2, 4, 6, 8, 10, 12, 14, 16};
330 std::vector<uint8_t> input1 = { 2 };
332 std::vector<uint8_t> output = { 1, 2, 3, 4, 5, 6, 7, 8};
334 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QAsymmU8>(
343 tensorHandleFactory);
351 unsigned int shape0[] = { 1, 3, 3, 2 };
352 unsigned int shape1[] = { 1, 1, 1, 2 };
354 std::vector<uint8_t> input0 =
357 7, 16, 9, 20, 11, 24,
358 13, 28, 15, 32, 17, 36
361 std::vector<uint8_t> input1 = { 1, 2 };
363 std::vector<uint8_t> output =
367 13, 14, 15, 16, 17, 18
370 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QAsymmU8>(
379 tensorHandleFactory);
387 unsigned int shape[] = { 2, 2, 2, 2 };
389 std::vector<int16_t> input0 =
391 2, 2, 2, 2, 3, 3, 3, 3,
392 4, 4, 4, 4, 5, 5, 5, 5
395 std::vector<int16_t> input1 =
397 1, 1, 1, 1, 2, 2, 2, 2,
398 4, 4, 4, 4, 4, 4, 4, 4
401 std::vector<int16_t> output =
403 8, 8, 8, 8, 6, 6, 6, 6,
404 4, 4, 4, 4, 5, 5, 5, 5
407 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QSymmS16>(
426 unsigned int shape0[] = { 1, 2, 2, 2 };
427 unsigned int shape1[] = { 1, 1, 1, 1 };
429 std::vector<int16_t> input0 = { 2, 4, 6, 8, 10, 12, 14, 16};
431 std::vector<int16_t> input1 = { 2 };
433 std::vector<int16_t> output = { 1, 2, 3, 4, 5, 6, 7, 8};
435 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QSymmS16>(
444 tensorHandleFactory);
452 unsigned int shape0[] = { 1, 3, 3, 2 };
453 unsigned int shape1[] = { 1, 1, 1, 2 };
455 std::vector<int16_t> input0 =
458 7, 16, 9, 20, 11, 24,
459 13, 28, 15, 32, 17, 36
462 std::vector<int16_t> input1 = { 1, 2 };
464 std::vector<int16_t> output =
468 13, 14, 15, 16, 17, 18
471 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::QSymmS16>(
480 tensorHandleFactory);
488 const unsigned int width = 2u;
489 const unsigned int height = 2u;
490 const unsigned int channelCount = 2u;
491 const unsigned int batchSize = 2u;
493 unsigned int shape[] = { batchSize, channelCount, height, width };
495 std::vector<int32_t> input0 =
497 8, 8, 8, 8, 6, 6, 6, 6,
498 8, 8, 8, 8, 5, 5, 5, 5
501 std::vector<int32_t> input1 =
503 4, 4, 4, 4, 2, 2, 2, 2,
504 2, 2, 2, 2, 1, 1, 1, 1
507 std::vector<int32_t> output =
509 2, 2, 2, 2, 3, 3, 3, 3,
510 4, 4, 4, 4, 5, 5, 5, 5
514 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Signed32>(
533 unsigned int shape0[] = { 1, 2, 2, 2 };
534 unsigned int shape1[] = { 1, 1, 1, 1 };
536 std::vector<int32_t> input0 = { 2, 4, 6, 8, 10, 12, 14, 16};
538 std::vector<int32_t> input1 = { 2 };
540 std::vector<int32_t> output = { 1, 2, 3, 4, 5, 6, 7, 8};
542 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Signed32>(
551 tensorHandleFactory);
559 unsigned int shape0[] = { 1, 3, 3, 2 };
560 unsigned int shape1[] = { 1, 1, 1, 2 };
562 std::vector<int32_t> input0 =
565 7, 16, 9, 20, 11, 24,
566 13, 28, 15, 32, 17, 36
569 std::vector<int32_t> input1 = { 1, 2 };
571 std::vector<int32_t> output =
575 13, 14, 15, 16, 17, 18
578 return ElementwiseTestHelper<4, armnn::DivisionQueueDescriptor, armnn::DataType::Signed32>(
587 tensorHandleFactory);
LayerTestResult< int32_t, 4 > DivisionBroadcast1ElementInt32Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< armnn::Half, 4 > DivisionBroadcast1DVectorFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< float, 4 > DivisionBroadcast1ElementTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< float, 4 > DivisionTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< armnn::Half, 4 > DivisionBroadcast1ElementFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< int32_t, 4 > DivisionInt32Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< int16_t, 4 > DivisionBroadcast1DVectorInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
void IgnoreUnused(Ts &&...)
LayerTestResult< uint8_t, 4 > DivisionBroadcast1DVectorUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
LayerTestResult< armnn::Half, 4 > DivisionFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< float, 4 > DivisionByZeroTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< uint8_t, 4 > DivisionBroadcast1ElementUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< int16_t, 4 > DivisionInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< uint8_t, 4 > DivisionUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< float, 4 > DivisionBroadcast1DVectorTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
LayerTestResult< int32_t, 4 > DivisionBroadcast1DVectorInt32Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
Contains information about TensorInfos of a layer.
LayerTestResult< int16_t, 4 > DivisionBroadcast1ElementInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)