ArmNN
 22.05.01
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)
 
LayerTestResult< int32_t, 4 > StackInt32Test (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 521 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

525 {
526  return StackAxis0TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
527 }

◆ StackFloat16Test()

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

Definition at line 569 of file StackTestImpl.cpp.

References armnn::Float16.

Referenced by TEST_SUITE().

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

◆ StackInt32Test()

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

Definition at line 638 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

642 {
643  return StackAxis0TestImpl<armnn::DataType::Signed32>(workloadFactory, memoryManager, tensorHandleFactory);
644 }

◆ StackOutput3DInputs3Float32Test()

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

Definition at line 553 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

557 {
558  return StackOutput3DInputs3TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
559 }

◆ StackOutput4DAxis1Float32Test()

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

Definition at line 529 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

533 {
534  return StackOutput4DAxis1TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
535 }

◆ StackOutput4DAxis2Float32Test()

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

Definition at line 537 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

541 {
542  return StackOutput4DAxis2TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
543 }

◆ StackOutput4DAxis3Float32Test()

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

Definition at line 545 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

549 {
550  return StackOutput4DAxis3TestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
551 }

◆ StackOutput5DFloat32Test()

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

Definition at line 561 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

565 {
566  return StackOutput5DTestImpl<armnn::DataType::Float32>(workloadFactory, memoryManager, tensorHandleFactory);
567 }