ArmNN
 21.11
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 519 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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

◆ StackFloat16Test()

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

Definition at line 567 of file StackTestImpl.cpp.

References armnn::Float16.

Referenced by TEST_SUITE().

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

◆ StackOutput3DInputs3Float32Test()

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

Definition at line 551 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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

◆ StackOutput4DAxis1Float32Test()

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

Definition at line 527 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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

◆ StackOutput4DAxis2Float32Test()

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

Definition at line 535 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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

◆ StackOutput4DAxis3Float32Test()

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

Definition at line 543 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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

◆ StackOutput5DFloat32Test()

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

Definition at line 559 of file StackTestImpl.cpp.

Referenced by TEST_SUITE().

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