diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-09-26 17:18:26 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2019-10-23 16:56:45 +0000 |
commit | 05069f07bcf95676597698a79926327555276362 (patch) | |
tree | a4a861127660aa439c9468da7479d92cecc85138 /src/graph/backends | |
parent | e36b5266e4c6593932432bc0289e431d007b8710 (diff) | |
download | ComputeLibrary-05069f07bcf95676597698a79926327555276362.tar.gz |
COMPMID-2515: Merge optimized depthwise convolution to the generic depthwise convolution function
3RDPARTY_UPDATE
Change-Id: Iff9e915c5329c617527b6f5042979f4e21a8b2b8
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2022
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/graph/backends')
-rw-r--r-- | src/graph/backends/CL/CLFunctionsFactory.cpp | 9 | ||||
-rw-r--r-- | src/graph/backends/CL/CLNodeValidator.cpp | 3 | ||||
-rw-r--r-- | src/graph/backends/GLES/GCNodeValidator.cpp | 1 | ||||
-rw-r--r-- | src/graph/backends/NEON/NEFunctionFactory.cpp | 9 | ||||
-rw-r--r-- | src/graph/backends/NEON/NENodeValidator.cpp | 3 |
5 files changed, 4 insertions, 21 deletions
diff --git a/src/graph/backends/CL/CLFunctionsFactory.cpp b/src/graph/backends/CL/CLFunctionsFactory.cpp index 6d231f2ef3..d53b634bb1 100644 --- a/src/graph/backends/CL/CLFunctionsFactory.cpp +++ b/src/graph/backends/CL/CLFunctionsFactory.cpp @@ -56,13 +56,6 @@ struct CLConvolutionLayerFunctions using WinogradConvolutionLayer = CLWinogradConvolutionLayer; }; -/** Collection of CL depthwise convolution functions */ -struct CLDepthwiseConvolutionLayerFunctions -{ - using GenericDepthwiseConvolutionLayer = CLDepthwiseConvolutionLayer; - using OptimizedDepthwiseConvolutionLayer = CLDepthwiseConvolutionLayer; -}; - /** Collection of CL element-wise functions */ struct CLEltwiseFunctions { @@ -249,7 +242,7 @@ std::unique_ptr<IFunction> CLFunctionFactory::create(INode *node, GraphContext & case NodeType::ConcatenateLayer: return detail::create_concatenate_layer<CLConcatenateLayer, CLTargetInfo>(*polymorphic_downcast<ConcatenateLayerNode *>(node)); case NodeType::DepthwiseConvolutionLayer: - return detail::create_depthwise_convolution_layer<CLDepthwiseConvolutionLayerFunctions, CLTargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); + return detail::create_depthwise_convolution_layer<CLDepthwiseConvolutionLayer, CLTargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); case NodeType::DetectionOutputLayer: return detail::create_detection_output_layer<CPPDetectionOutputLayer, CLTargetInfo>(*polymorphic_downcast<DetectionOutputLayerNode *>(node)); case NodeType::DetectionPostProcessLayer: diff --git a/src/graph/backends/CL/CLNodeValidator.cpp b/src/graph/backends/CL/CLNodeValidator.cpp index 40ec508767..a2786187a2 100644 --- a/src/graph/backends/CL/CLNodeValidator.cpp +++ b/src/graph/backends/CL/CLNodeValidator.cpp @@ -58,8 +58,7 @@ Status CLNodeValidator::validate(INode *node) CLGEMMConvolutionLayer, CLWinogradConvolutionLayer>(*polymorphic_downcast<ConvolutionLayerNode *>(node)); case NodeType::DepthwiseConvolutionLayer: - return detail::validate_depthwise_convolution_layer<CLDepthwiseConvolutionLayer, - CLDepthwiseConvolutionLayer3x3>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); + return detail::validate_depthwise_convolution_layer<CLDepthwiseConvolutionLayer>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); case NodeType::DetectionOutputLayer: return detail::validate_detection_output_layer<CPPDetectionOutputLayer>(*polymorphic_downcast<DetectionOutputLayerNode *>(node)); case NodeType::DetectionPostProcessLayer: diff --git a/src/graph/backends/GLES/GCNodeValidator.cpp b/src/graph/backends/GLES/GCNodeValidator.cpp index 9cbb9a12ef..9d848ab3b1 100644 --- a/src/graph/backends/GLES/GCNodeValidator.cpp +++ b/src/graph/backends/GLES/GCNodeValidator.cpp @@ -58,7 +58,6 @@ Status validate_depthwise_convolution_layer(DepthwiseConvolutionLayerNode &node) // TODO (geopin01) : Switch when validation is implemented // Validate function ARM_COMPUTE_RETURN_ERROR_ON_MSG(weights->tensor_shape().x() != 3 && weights->tensor_shape().y() != 3, "Unsupported depthwise convolution"); - node.set_depthwise_convolution_method(DepthwiseConvolutionMethod::Optimized3x3); return Status{}; } diff --git a/src/graph/backends/NEON/NEFunctionFactory.cpp b/src/graph/backends/NEON/NEFunctionFactory.cpp index 45e9727133..d8b0ae92ea 100644 --- a/src/graph/backends/NEON/NEFunctionFactory.cpp +++ b/src/graph/backends/NEON/NEFunctionFactory.cpp @@ -62,13 +62,6 @@ struct NEConvolutionLayerFunctions using WinogradConvolutionLayer = NEWinogradConvolutionLayer; }; -/** Collection of CL depthwise convolution functions */ -struct NEDepthwiseConvolutionLayerFunctions -{ - using GenericDepthwiseConvolutionLayer = NEDepthwiseConvolutionLayer; - using OptimizedDepthwiseConvolutionLayer = NEDepthwiseConvolutionLayerOptimized; -}; - /** Collection of CL element-wise functions */ struct NEEltwiseFunctions { @@ -213,7 +206,7 @@ std::unique_ptr<IFunction> NEFunctionFactory::create(INode *node, GraphContext & case NodeType::ConcatenateLayer: return detail::create_concatenate_layer<NEConcatenateLayer, NETargetInfo>(*polymorphic_downcast<ConcatenateLayerNode *>(node)); case NodeType::DepthwiseConvolutionLayer: - return detail::create_depthwise_convolution_layer<NEDepthwiseConvolutionLayerFunctions, NETargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); + return detail::create_depthwise_convolution_layer<NEDepthwiseConvolutionLayer, NETargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); case NodeType::DetectionOutputLayer: return detail::create_detection_output_layer<CPPDetectionOutputLayer, NETargetInfo>(*polymorphic_downcast<DetectionOutputLayerNode *>(node)); case NodeType::DetectionPostProcessLayer: diff --git a/src/graph/backends/NEON/NENodeValidator.cpp b/src/graph/backends/NEON/NENodeValidator.cpp index 734b3401f7..0b53657c42 100644 --- a/src/graph/backends/NEON/NENodeValidator.cpp +++ b/src/graph/backends/NEON/NENodeValidator.cpp @@ -58,8 +58,7 @@ Status NENodeValidator::validate(INode *node) NEGEMMConvolutionLayer, NEWinogradConvolutionLayer>(*polymorphic_downcast<ConvolutionLayerNode *>(node)); case NodeType::DepthwiseConvolutionLayer: - return detail::validate_depthwise_convolution_layer<NEDepthwiseConvolutionLayer, - NEDepthwiseConvolutionLayer3x3>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); + return detail::validate_depthwise_convolution_layer<NEDepthwiseConvolutionLayer>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node)); case NodeType::DetectionOutputLayer: return detail::validate_detection_output_layer<CPPDetectionOutputLayer>(*polymorphic_downcast<DetectionOutputLayerNode *>(node)); case NodeType::DetectionPostProcessLayer: |