Compute Library
 22.05
ActivationLayer.cpp File Reference
#include "arm_compute/core/Types.h"
#include "arm_compute/core/utils/misc/Traits.h"
#include "arm_compute/runtime/NEON/functions/NEActivationLayer.h"
#include "arm_compute/runtime/RuntimeContext.h"
#include "arm_compute/runtime/Tensor.h"
#include "arm_compute/runtime/TensorAllocator.h"
#include "src/common/cpuinfo/CpuIsaInfo.h"
#include "src/cpu/kernels/CpuActivationKernel.h"
#include "tests/NEON/Accessor.h"
#include "tests/PaddingCalculator.h"
#include "tests/datasets/ActivationFunctionsDataset.h"
#include "tests/datasets/ShapeDatasets.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Validation.h"
#include "tests/validation/fixtures/ActivationLayerFixture.h"
#include "arm_compute/Acl.hpp"
#include "support/Requires.h"

Go to the source code of this file.

Namespaces

 arm_compute
 Copyright (c) 2017-2022 Arm Limited.
 
 arm_compute::test
 
 arm_compute::test::validation
 

Typedefs

template<typename T >
using NEActivationLayerFixture = ActivationValidationFixture< Tensor, Accessor, NEActivationLayer, T >
 

Functions

 TEST_CASE (ActivationAPI, framework::DatasetMode::ALL)
 Test case for memory injection in cpu::CpuWinogradConv2d. More...
 
 DATA_TEST_CASE (Validate, framework::DatasetMode::ALL, zip(zip(zip(framework::dataset::make("InputInfo", { TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F32), }), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(27U, 13U, 2U), 1, DataType::F16), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), TensorInfo(TensorShape(32U, 13U, 2U), 1, DataType::F32), })), framework::dataset::make("ActivationInfo", { ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU), })), framework::dataset::make("Expected", { false, true, false})), input_info, output_info, act_info, expected)
 
 DATA_TEST_CASE (KernelSelection, framework::DatasetMode::ALL, concat(concat(combine(framework::dataset::make("CpuExt", std::string("NEON")), framework::dataset::make("DataType", { DataType::F32, DataType::F16, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::QSYMM16 })), combine(framework::dataset::make("CpuExt", std::string("SVE")), framework::dataset::make("DataType", { DataType::F32, DataType::F16, }))), combine(framework::dataset::make("CpuExt", std::string("SVE2")), framework::dataset::make("DataType", { DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::QSYMM16 }))), cpu_ext, data_type)
 
 TEST_CASE (SqrtBoundaryValue, framework::DatasetMode::ALL)
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEActivationLayerFixture< float >, framework::DatasetMode::ALL, combine(combine(datasets::SmallShapes(), ActivationDataset), framework::dataset::make("DataType", DataType::F32)))
 
 TEST_SUITE_END () FIXTURE_DATA_TEST_CASE(RunSmall = ActivationValidationQuantizedFixture<CLTensor, CLAccessor, CLActivationLayer, T>
 [CLActivationLayer Test snippet] More...
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEActivationLayerQuantizedFixture< uint8_t >, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallShapes(), QuantizedActivationDataset), framework::dataset::make("DataType", DataType::QASYMM8)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.1f, 128.0f) })))
 
 combine (combine(combine(datasets::SmallShapes(), QuantizedActivationDataset), framework::dataset::make("DataType", DataType::QASYMM8_SIGNED)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(0.5f, 10.0f) })))
 
 FIXTURE_DATA_TEST_CASE (RunSmall, NEActivationLayerQuantizedFixture< int16_t >, framework::DatasetMode::ALL, combine(combine(combine(datasets::SmallShapes(), Int16QuantizedActivationDataset), framework::dataset::make("DataType", DataType::QSYMM16)), framework::dataset::make("QuantizationInfo", { QuantizationInfo(1.f/32768.f, 0.f) })))
 

Variables

const auto QuantizedActivationDataset
 
 NEActivationLayerQuantizedFixture< int8_t >
 
const auto Int16QuantizedActivationDataset