MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / map_to_arm_gemm_activation

Function map_to_arm_gemm_activation

src/core/utils/AssemblyUtils.cpp:32–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace assembly_utils
31{
32arm_gemm::Activation map_to_arm_gemm_activation(const ActivationLayerInfo &act)
33{
34 arm_gemm::Activation gemm_act;
35
36 // Early exit in case lower bound is other than 0, as it's not yet supported
37 if (act.b() != 0.f)
38 {
39 return gemm_act;
40 }
41
42 switch (act.activation())
43 {
44 case ActivationLayerInfo::ActivationFunction::RELU:
45 gemm_act.type = arm_gemm::Activation::Type::ReLU;
46 break;
47 case ActivationLayerInfo::ActivationFunction::BOUNDED_RELU:
48 gemm_act.type = arm_gemm::Activation::Type::BoundedReLU;
49 gemm_act.param1 = act.a();
50 gemm_act.param2 = 0.f;
51 break;
52 case ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU:
53 gemm_act.type = arm_gemm::Activation::Type::BoundedReLU;
54 gemm_act.param1 = act.a();
55 gemm_act.param2 = act.b();
56 break;
57 default:
58 gemm_act.type = arm_gemm::Activation::Type::None;
59 }
60
61 return gemm_act;
62}
63
64arm_conv::PaddingValues map_to_arm_conv_padding(const PadStrideInfo &pad_stride_info)
65{

Callers 7

has_opt_implMethod · 0.85
configureMethod · 0.85
create_arm_dwcFunction · 0.85
create_arm_dwc_quantFunction · 0.85

Calls 3

bMethod · 0.80
activationMethod · 0.80
aMethod · 0.80

Tested by

no test coverage detected