11 std::unique_ptr<armnn::IWorkload> CreateWorkload<armnn::MaximumQueueDescriptor>(
16 return workloadFactory.CreateMaximum(descriptor, info);
22 boost::ignore_unused(memoryManager);
23 const unsigned int width = 2u;
24 const unsigned int height = 2u;
25 const unsigned int channelCount = 2u;
26 const unsigned int batchSize = 2u;
28 unsigned int shape[] = { batchSize, channelCount, height, width };
30 std::vector<float> input0 =
32 1.f, 1.f, 1.f, 1.f, 5.f, 5.f, 5.f, 5.f,
33 3.f, 3.f, 3.f, 3.f, 4.f, 4.f, 4.f, 4.f
36 std::vector<float> input1 =
38 2.f, 2.f, 2.f, 2.f, 3.f, 3.f, 3.f, 3.f,
39 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f
42 std::vector<float> output =
44 2.f, 2.f, 2.f, 2.f, 5.f, 5.f, 5.f, 5.f,
45 4.f, 4.f, 4.f, 4.f, 5.f, 5.f, 5.f, 5.f
48 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float32>(
63 unsigned int shape0[] = { 1, 2, 2, 2 };
64 unsigned int shape1[] = { 1, 1, 1, 1 };
66 std::vector<float> input0 = { 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f };
68 std::vector<float> input1 = { 2.f };
70 std::vector<float> output = { 2.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f };
72 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float32>(
87 const unsigned int shape0[] = { 1, 2, 2, 3 };
88 const unsigned int shape1[] = { 1, 1, 1, 3 };
90 std::vector<float> input0 =
92 1.f, 2.f, 3.f, 4.f, 5.f, 6.f,
93 7.f, 8.f, 9.f, 10.f, 11.f, 12.f
96 std::vector<float> input1 = { 1.f, 2.f, 3.f };
98 std::vector<float> output =
100 1.f, 2.f, 3.f, 4.f, 5.f, 6.f,
101 7.f, 8.f, 9.f, 10.f, 11.f, 12.f
104 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float32>(
118 using namespace half_float::literal;
120 const unsigned int width = 2u;
121 const unsigned int height = 2u;
122 const unsigned int channelCount = 2u;
123 const unsigned int batchSize = 2u;
125 unsigned int shape[] = { batchSize, channelCount, height, width };
127 std::vector<armnn::Half> input0 =
129 1._h, 1._h, 1._h, 1._h, 5._h, 5._h, 5._h, 5._h,
130 3._h, 3._h, 3._h, 3._h, 4._h, 4._h, 4._h, 4._h
133 std::vector<armnn::Half> input1 =
135 2._h, 2._h, 2._h, 2._h, 3._h, 3._h, 3._h, 3._h,
136 4._h, 4._h, 4._h, 4._h, 5._h, 5._h, 5._h, 5._h
139 std::vector<armnn::Half> output =
141 2._h, 2._h, 2._h, 2._h, 5._h, 5._h, 5._h, 5._h,
142 4._h, 4._h, 4._h, 4._h, 5._h, 5._h, 5._h, 5._h
145 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float16>(
160 using namespace half_float::literal;
162 unsigned int shape0[] = { 1, 2, 2, 2 };
163 unsigned int shape1[] = { 1, 1, 1, 1 };
165 std::vector<armnn::Half> input0 = { 1._h, 2._h, 3._h, 4._h, 5._h, 6._h, 7._h, 8._h };
167 std::vector<armnn::Half> input1 = { 2._h };
169 std::vector<armnn::Half> output = { 2._h, 2._h, 3._h, 4._h, 5._h, 6._h, 7._h, 8._h };
171 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float16>(
186 using namespace half_float::literal;
188 const unsigned int shape0[] = { 1, 2, 2, 3 };
189 const unsigned int shape1[] = { 1, 1, 1, 3 };
191 std::vector<armnn::Half> input0 =
193 1._h, 2._h, 3._h, 4._h, 5._h, 6._h,
194 7._h, 8._h, 9._h, 10._h, 11._h, 12._h
197 std::vector<armnn::Half> input1 = { 1._h, 2._h, 3._h };
199 std::vector<armnn::Half> output =
201 1._h, 2._h, 3._h, 4._h, 5._h, 6._h,
202 7._h, 8._h, 9._h, 10._h, 11._h, 12._h
205 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::Float16>(
220 unsigned int shape[] = { 2, 2, 2, 2 };
223 std::vector<uint8_t> input0 =
225 1, 1, 1, 1, 6, 6, 6, 6,
226 3, 3, 3, 3, 4, 4, 4, 4
229 std::vector<uint8_t> input1 =
231 2, 2, 2, 2, 3, 3, 3, 3,
232 4, 4, 4, 4, 5, 5, 5, 5
235 std::vector<uint8_t> output =
237 2, 2, 2, 2, 6, 6, 6, 6,
238 4, 4, 4, 4, 5, 5, 5, 5
241 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QAsymmU8>(
256 const unsigned int shape0[] = { 1, 2, 2, 3 };
257 const unsigned int shape1[] = { 1, 1, 1, 1 };
259 std::vector<uint8_t> input0 =
265 std::vector<uint8_t> input1 = { 2 };
267 std::vector<uint8_t> output =
273 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QAsymmU8>(
288 const unsigned int shape0[] = { 1, 2, 2, 3 };
289 const unsigned int shape1[] = { 1, 1, 1, 3 };
291 std::vector<uint8_t> input0 =
297 std::vector<uint8_t> input1 = { 1, 10, 3 };
299 std::vector<uint8_t> output = {
304 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QAsymmU8>(
319 unsigned int shape[] = { 2, 2, 2, 2 };
321 std::vector<int16_t> input0({ 1, 1, 1, 1, 6, 6, 6, 6,
322 3, 3, 3, 3, 4, 4, 4, 4 });
324 std::vector<int16_t> input1({ 2, 2, 2, 2, 3, 3, 3, 3,
325 4, 4, 4, 4, 5, 5, 5, 5 });
327 std::vector<int16_t> output({ 2, 2, 2, 2, 6, 6, 6, 6,
328 4, 4, 4, 4, 5, 5, 5, 5 });
330 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QSymmS16>(
345 const unsigned int shape0[] = { 1, 2, 2, 3 };
346 const unsigned int shape1[] = { 1, 1, 1, 1 };
348 std::vector<int16_t> input0 =
354 std::vector<int16_t> input1 = { 2 };
356 std::vector<int16_t> output =
362 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QSymmS16>(
377 const unsigned int shape0[] = { 1, 2, 2, 3 };
378 const unsigned int shape1[] = { 1, 1, 1, 3 };
380 std::vector<int16_t> input0 =
386 std::vector<int16_t> input1 = { 1, 10, 3 };
388 std::vector<int16_t> output =
394 return ElementwiseTestHelper<4, armnn::MaximumQueueDescriptor, armnn::DataType::QSymmS16>(
LayerTestResult< int16_t, 4 > MaximumBroadcast1DVectorInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< armnn::Half, 4 > MaximumBroadcast1ElementFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< armnn::Half, 4 > MaximumFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< float, 4 > MaximumBroadcast1ElementTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
LayerTestResult< int16_t, 4 > MaximumBroadcast1ElementInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< int16_t, 4 > MaximumInt16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< uint8_t, 4 > MaximumBroadcast1DVectorUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< armnn::Half, 4 > MaximumBroadcast1DVectorFloat16Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< float, 4 > MaximumSimpleTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< uint8_t, 4 > MaximumUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< uint8_t, 4 > MaximumBroadcast1ElementUint8Test(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
LayerTestResult< float, 4 > MaximumBroadcast1DVectorTest(armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)