diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-06-20 16:00:27 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2019-07-11 16:52:18 +0000 |
commit | bffb41e06c1276af00e1605ef934d05fa61f7127 (patch) | |
tree | 7c9cfe90e82a8107ad8e32272c4e40c4b63182ef /src/graph/backends | |
parent | c1b76faf6be5c33dbf3269faea95e185ac37992f (diff) | |
download | ComputeLibrary-bffb41e06c1276af00e1605ef934d05fa61f7127.tar.gz |
COMPMID-2273: Fuse Batch Normalization with Depthwise Convolution layer at graph level (only for CL)
Change-Id: I1d941c6e66722f39583bf68148c980bb28ff89a1
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1423
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/backends')
-rw-r--r-- | src/graph/backends/CL/CLFunctionsFactory.cpp | 7 | ||||
-rw-r--r-- | src/graph/backends/NEON/NEFunctionFactory.cpp | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/graph/backends/CL/CLFunctionsFactory.cpp b/src/graph/backends/CL/CLFunctionsFactory.cpp index c14100ab42..b9f22f6199 100644 --- a/src/graph/backends/CL/CLFunctionsFactory.cpp +++ b/src/graph/backends/CL/CLFunctionsFactory.cpp @@ -74,8 +74,9 @@ struct CLEltwiseFunctions /** Function and tensor types to be used inside a CL fused convolution/batch normalization layer */ struct CLFusedLayerTypes { - using ConvolutionLayer = CLConvolutionLayer; - using FuseBatchNormalization = CLFuseBatchNormalization; + using ConvolutionLayer = CLConvolutionLayer; + using DepthwiseConvolutionLayer = CLDepthwiseConvolutionLayer; + using FuseBatchNormalization = CLFuseBatchNormalization; }; // TODO (isagot01): Remove once we support heterogeneous scheduling at function level @@ -203,6 +204,8 @@ std::unique_ptr<IFunction> CLFunctionFactory::create(INode *node, GraphContext & return detail::create_fully_connected_layer<CLFullyConnectedLayer, CLTargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx); case NodeType::FusedConvolutionBatchNormalizationLayer: return detail::create_fused_convolution_batch_normalization_layer<CLFusedLayerTypes, CLTargetInfo>(*polymorphic_downcast<FusedConvolutionBatchNormalizationNode *>(node)); + case NodeType::FusedDepthwiseConvolutionBatchNormalizationLayer: + return detail::create_fused_depthwise_convolution_batch_normalization_layer<CLFusedLayerTypes, CLTargetInfo>(*polymorphic_downcast<FusedDepthwiseConvolutionBatchNormalizationNode *>(node)); case NodeType::GenerateProposalsLayer: return detail::create_generate_proposals_layer<CLGenerateProposalsLayer, CLTargetInfo>(*polymorphic_downcast<GenerateProposalsLayerNode *>(node), ctx); case NodeType::NormalizationLayer: diff --git a/src/graph/backends/NEON/NEFunctionFactory.cpp b/src/graph/backends/NEON/NEFunctionFactory.cpp index d4892f53a6..ad96240a4b 100644 --- a/src/graph/backends/NEON/NEFunctionFactory.cpp +++ b/src/graph/backends/NEON/NEFunctionFactory.cpp @@ -80,8 +80,9 @@ struct NEEltwiseFunctions /** Function and tensor types to be used inside a NEON fused convolution/batch normalization layer */ struct NEFusedLayerTypes { - using ConvolutionLayer = NEConvolutionLayer; - using FuseBatchNormalization = NEFuseBatchNormalization; + using ConvolutionLayer = NEConvolutionLayer; + using DepthwiseConvolutionLayer = NEDepthwiseConvolutionLayer; + using FuseBatchNormalization = NEFuseBatchNormalization; }; namespace detail |