diff options
author | SiCongLi <sicong.li@arm.com> | 2020-03-02 15:39:15 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2020-03-25 11:23:19 +0000 |
commit | 2e5fd637205770ec5e11096e6e19b8efc67d544e (patch) | |
tree | c7f5b53d6ec54cf39fcc638bad9d054c3e04bf43 /src/graph | |
parent | 51a9558d484e812707a776efceef18b93698cec9 (diff) | |
download | ComputeLibrary-2e5fd637205770ec5e11096e6e19b8efc67d544e.tar.gz |
COMPMID-3098 Fuse Relu and Bounded Relu with FullyConnected NEON
Change-Id: Id28062445590d6c06b35f7d7434eb38393ae94a7
Signed-off-by: SiCongLi <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2875
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph')
-rw-r--r-- | src/graph/mutators/NodeFusionMutator.cpp | 6 | ||||
-rw-r--r-- | src/graph/mutators/SyntheticDataTypeMutator.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/graph/mutators/NodeFusionMutator.cpp b/src/graph/mutators/NodeFusionMutator.cpp index 151a8bfa03..273e6ce746 100644 --- a/src/graph/mutators/NodeFusionMutator.cpp +++ b/src/graph/mutators/NodeFusionMutator.cpp @@ -301,10 +301,6 @@ void NodeFusionMutator::mutate(Graph &g) { return true; }; - auto cl_target_prec = [](INode & n) - { - return n.assigned_target() == Target::CL; - }; auto qs8_prec = [&g](INode & n) { ARM_COMPUTE_ERROR_ON(n.output(0) == nullptr); @@ -322,7 +318,7 @@ void NodeFusionMutator::mutate(Graph &g) detail::fuse_layer<BatchNormalizationLayerNode, ActivationLayerNode>(g, empty_prec, detail::fuse_node_with_activation<BatchNormalizationLayerNode>, supported_fused_activations); detail::fuse_layer<ConvolutionLayerNode, ActivationLayerNode>(g, empty_prec, detail::fuse_node_with_activation<ConvolutionLayerNode>, supported_fused_activations); detail::fuse_layer<DepthwiseConvolutionLayerNode, ActivationLayerNode>(g, qs8_prec, detail::fuse_node_with_activation<DepthwiseConvolutionLayerNode>, supported_fused_activations); - detail::fuse_layer<FullyConnectedLayerNode, ActivationLayerNode>(g, cl_target_prec, detail::fuse_node_with_activation<FullyConnectedLayerNode>, supported_fused_activations); + detail::fuse_layer<FullyConnectedLayerNode, ActivationLayerNode>(g, empty_prec, detail::fuse_node_with_activation<FullyConnectedLayerNode>, supported_fused_activations); detail::fuse_layer<ConvolutionLayerNode, BatchNormalizationLayerNode>(g, empty_prec, detail::fuse_convolution_with_batch_normalization); detail::fuse_layer<DepthwiseConvolutionLayerNode, BatchNormalizationLayerNode>(g, empty_prec, detail::fuse_depthwise_convolution_with_batch_normalization); } diff --git a/src/graph/mutators/SyntheticDataTypeMutator.cpp b/src/graph/mutators/SyntheticDataTypeMutator.cpp index b318df956e..0a9f5058dd 100644 --- a/src/graph/mutators/SyntheticDataTypeMutator.cpp +++ b/src/graph/mutators/SyntheticDataTypeMutator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 ARM Limited. + * Copyright (c) 2019-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -175,6 +175,10 @@ void convert_special_tensors(Graph &g) { tensor->desc().quant_info = QuantizationInfo(1.f / 128.f, 128); } + else if(act_node->activation_info().activation() == ActivationLayerInfo::ActivationFunction::LOGISTIC) + { + tensor->desc().quant_info = QuantizationInfo(1.f / 256.f, 0); + } return true; }; |