20.11
|
#include "LayersFwd.hpp"
#include <Network.hpp>
#include <ResolveType.hpp>
#include <armnn/INetwork.hpp>
#include <test/TestUtils.hpp>
#include <boost/test/unit_test.hpp>
#include <QuantizeHelper.hpp>
#include <string>
Go to the source code of this file.
Functions | |
template<typename LayerTest , armnn::DataType ArmnnType> | |
INetworkPtr | CreatNetwork (ActivationDescriptor activationDescriptor, bool preventFusing) |
template<typename LayerTest , armnn::DataType ArmnnType, typename LayerType = typename LayerTest::LayerType, typename T = armnn::ResolveType<ArmnnType>> | |
void | FuseActivationIntoPreviousLayerTest (ActivationDescriptor activationDescriptor, float tolerance, armnn::Compute backendId) |
BOOST_AUTO_TEST_CASE (FuseReLUIntoConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoDWConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoFullyConnectedFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoBatchNormFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoDWConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoFullyConnectedFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoBatchNormFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoConvQAsymmU8CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoDWConvQAsymmU8CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoFullyConnectedQAsymmU8CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoConvFloat32CpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoDWConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoFullyConnectedFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoBatchNormFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoMulFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoAddFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoSubFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUIntoDivFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoDWConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoFullyConnectedFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoBatchNormFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoMulFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoAddFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoSubFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseBoundedReLUIntoDivFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUQIntoConvAsymmU8GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUQIntoDWConvAsymmU8GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseReLUQIntoFullyConnectedAsymmU8GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoMulFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoAddFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoSubFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseHardSwishIntoDivFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoConvFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoMulFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoAddFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoSubFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE (FuseTanHIntoDivFloat32GpuAccTest) | |
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoConvFloat32CpuAccTest | ) |
Definition at line 407 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoDWConvFloat32CpuAccTest | ) |
Definition at line 415 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoFullyConnectedFloat32CpuAccTest | ) |
Definition at line 423 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoBatchNormFloat32CpuAccTest | ) |
Definition at line 431 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoConvFloat32CpuAccTest | ) |
Definition at line 441 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoDWConvFloat32CpuAccTest | ) |
Definition at line 451 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoFullyConnectedFloat32CpuAccTest | ) |
Definition at line 461 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoBatchNormFloat32CpuAccTest | ) |
Definition at line 471 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoConvQAsymmU8CpuAccTest | ) |
Definition at line 483 of file FuseActivationTests.cpp.
References armnn::CpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoDWConvQAsymmU8CpuAccTest | ) |
Definition at line 491 of file FuseActivationTests.cpp.
References armnn::CpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoFullyConnectedQAsymmU8CpuAccTest | ) |
Definition at line 499 of file FuseActivationTests.cpp.
References armnn::CpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoConvFloat32CpuAccTest | ) |
Definition at line 509 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoConvFloat32CpuAccTest | ) |
Definition at line 519 of file FuseActivationTests.cpp.
References armnn::CpuAcc, armnn::Float32, ActivationDescriptor::m_Function, and armnn::TanH.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoConvFloat32GpuAccTest | ) |
Definition at line 531 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoDWConvFloat32GpuAccTest | ) |
Definition at line 539 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoFullyConnectedFloat32GpuAccTest | ) |
Definition at line 547 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoBatchNormFloat32GpuAccTest | ) |
Definition at line 555 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoMulFloat32GpuAccTest | ) |
Definition at line 563 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoAddFloat32GpuAccTest | ) |
Definition at line 571 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoSubFloat32GpuAccTest | ) |
Definition at line 579 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUIntoDivFloat32GpuAccTest | ) |
Definition at line 587 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoConvFloat32GpuAccTest | ) |
Definition at line 597 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoDWConvFloat32GpuAccTest | ) |
Definition at line 607 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoFullyConnectedFloat32GpuAccTest | ) |
Definition at line 617 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoBatchNormFloat32GpuAccTest | ) |
Definition at line 627 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoMulFloat32GpuAccTest | ) |
Definition at line 637 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoAddFloat32GpuAccTest | ) |
Definition at line 647 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoSubFloat32GpuAccTest | ) |
Definition at line 657 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseBoundedReLUIntoDivFloat32GpuAccTest | ) |
Definition at line 667 of file FuseActivationTests.cpp.
References armnn::BoundedReLu, armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_A, ActivationDescriptor::m_B, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseReLUQIntoConvAsymmU8GpuAccTest | ) |
Definition at line 679 of file FuseActivationTests.cpp.
References armnn::GpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUQIntoDWConvAsymmU8GpuAccTest | ) |
Definition at line 687 of file FuseActivationTests.cpp.
References armnn::GpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseReLUQIntoFullyConnectedAsymmU8GpuAccTest | ) |
Definition at line 695 of file FuseActivationTests.cpp.
References armnn::GpuAcc, ActivationDescriptor::m_Function, armnn::QAsymmU8, and armnn::ReLu.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoConvFloat32GpuAccTest | ) |
Definition at line 705 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoMulFloat32GpuAccTest | ) |
Definition at line 713 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoAddFloat32GpuAccTest | ) |
Definition at line 721 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoSubFloat32GpuAccTest | ) |
Definition at line 729 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseHardSwishIntoDivFloat32GpuAccTest | ) |
Definition at line 737 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, armnn::HardSwish, and ActivationDescriptor::m_Function.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoConvFloat32GpuAccTest | ) |
Definition at line 747 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::TanH.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoMulFloat32GpuAccTest | ) |
Definition at line 755 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::TanH.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoAddFloat32GpuAccTest | ) |
Definition at line 763 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::TanH.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoSubFloat32GpuAccTest | ) |
Definition at line 771 of file FuseActivationTests.cpp.
References armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::TanH.
BOOST_AUTO_TEST_CASE | ( | FuseTanHIntoDivFloat32GpuAccTest | ) |
Definition at line 779 of file FuseActivationTests.cpp.
References BOOST_AUTO_TEST_SUITE_END(), armnn::Float32, armnn::GpuAcc, ActivationDescriptor::m_Function, and armnn::TanH.
INetworkPtr CreatNetwork | ( | ActivationDescriptor | activationDescriptor, |
bool | preventFusing | ||
) |
Definition at line 268 of file FuseActivationTests.cpp.
References IOutputSlot::Connect(), INetwork::Create(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().
void FuseActivationIntoPreviousLayerTest | ( | ActivationDescriptor | activationDescriptor, |
float | tolerance, | ||
armnn::Compute | backendId | ||
) |
Definition at line 314 of file FuseActivationTests.cpp.