ArmNN
 21.02
StackTestImpl.hpp File Reference

Go to the source code of this file.

Functions

LayerTestResult< float, 4 > StackAxis0Float32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< float, 4 > StackOutput4DAxis1Float32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< float, 4 > StackOutput4DAxis2Float32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< float, 4 > StackOutput4DAxis3Float32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< float, 3 > StackOutput3DInputs3Float32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< float, 5 > StackOutput5DFloat32Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 
LayerTestResult< armnn::Half, 4 > StackFloat16Test (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager, const armnn::ITensorHandleFactory &tensorHandleFactory)
 

Function Documentation

◆ StackAxis0Float32Test()

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

Definition at line 517 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

521 {
522  return StackAxis0TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
523 }

◆ StackFloat16Test()

LayerTestResult<armnn::Half, 4> StackFloat16Test ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 565 of file StackTestImpl.cpp.

References armnn::Float16.

Referenced by BOOST_AUTO_TEST_CASE().

569 {
570  using namespace half_float::literal;
571 
572  armnn::TensorInfo inputTensorInfo ({ 3, 2, 3 }, armnn::DataType::Float16);
573  armnn::TensorInfo outputTensorInfo({ 3, 2, 2, 3 }, armnn::DataType::Float16);
574 
575  std::vector<std::vector<armnn::Half>> inputData;
576 
577  inputData.push_back(
578  {
579  1.0_h, 2.0_h, 3.0_h,
580  4.0_h, 5.0_h, 6.0_h,
581 
582  7.0_h, 8.0_h, 9.0_h,
583  10.0_h, 11.0_h, 12.0_h,
584 
585  13.0_h, 14.0_h, 15.0_h,
586  16.0_h, 17.0_h, 18.0_h
587  });
588 
589  inputData.push_back(
590  {
591  19.0_h, 20.0_h, 21.0_h,
592  22.0_h, 23.0_h, 24.0_h,
593 
594  25.0_h, 26.0_h, 27.0_h,
595  28.0_h, 29.0_h, 30.0_h,
596 
597  31.0_h, 32.0_h, 33.0_h,
598  34.0_h, 35.0_h, 36.0_h
599  });
600 
601  std::vector<armnn::Half> outputExpectedData =
602  {
603  1.0_h, 2.0_h, 3.0_h,
604  19.0_h, 20.0_h, 21.0_h,
605 
606  4.0_h, 5.0_h, 6.0_h,
607  22.0_h, 23.0_h, 24.0_h,
608 
609  7.0_h, 8.0_h, 9.0_h,
610  25.0_h, 26.0_h, 27.0_h,
611 
612  10.0_h, 11.0_h, 12.0_h,
613  28.0_h, 29.0_h, 30.0_h,
614 
615  13.0_h, 14.0_h, 15.0_h,
616  31.0_h, 32.0_h, 33.0_h,
617 
618  16.0_h, 17.0_h, 18.0_h,
619  34.0_h, 35.0_h, 36.0_h
620  };
621 
622  return StackTestHelper<armnn::DataType::Float16, armnn::Half, 4>(
623  workloadFactory,
624  memoryManager,
625  tensorHandleFactory,
626  inputTensorInfo,
627  outputTensorInfo,
628  2U,
629  inputData,
630  outputExpectedData
631  );
632 }

◆ StackOutput3DInputs3Float32Test()

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

Definition at line 549 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

553 {
554  return StackOutput3DInputs3TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
555 }

◆ StackOutput4DAxis1Float32Test()

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

Definition at line 525 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

529 {
530  return StackOutput4DAxis1TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
531 }

◆ StackOutput4DAxis2Float32Test()

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

Definition at line 533 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

537 {
538  return StackOutput4DAxis2TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
539 }

◆ StackOutput4DAxis3Float32Test()

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

Definition at line 541 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

545 {
546  return StackOutput4DAxis3TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
547 }

◆ StackOutput5DFloat32Test()

LayerTestResult<float, 5> StackOutput5DFloat32Test ( armnn::IWorkloadFactory workloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtr memoryManager,
const armnn::ITensorHandleFactory tensorHandleFactory 
)

Definition at line 557 of file StackTestImpl.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

561 {
562  return StackOutput5DTestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
563 }