diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-01-02 13:27:37 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:42:33 +0000 |
commit | 1250a5a259962514d31bb5f8148f1d0f0a82b946 (patch) | |
tree | a9c16daffa5228926715c805d73310b4b3c2e324 /arm_compute/core | |
parent | 7c23ad01c028f73aef0b439fc5d5d14e92e5f4e2 (diff) | |
download | ComputeLibrary-1250a5a259962514d31bb5f8148f1d0f0a82b946.tar.gz |
COMPMID-767 : Propagate hints to subgraph.
-Propagates hints to subgraph.
-Fixes dispatching of apropriate optimized DepthwiseConvolution kernel
for OpenCL backend. NEON backend is altered to default to the generic
case until COMPMID-769 is addressed.
Change-Id: I544f05cd99a9ac253f1b19aa4e4bb222b8fdd087
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/114781
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/utils/misc/ShapeCalculator.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 52773faa3a..f31eb3d336 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -25,6 +25,7 @@ #define __ARM_COMPUTE_MISC_SHAPE_CALCULATOR_H__ #include "arm_compute/core/ITensorInfo.h" +#include "arm_compute/core/Utils.h" namespace arm_compute { @@ -98,6 +99,21 @@ inline TensorShape compute_transposed_shape(const ITensorInfo &input) return shape_transposed; } +inline TensorShape compute_depthwise_convolution_shape(const ITensorInfo &input, const ITensorInfo &weights, PadStrideInfo conv_info) +{ + const TensorShape input_shape{ input.tensor_shape() }; + const TensorShape weights_shape{ weights.tensor_shape() }; + + unsigned int output_width = 0; + unsigned int output_height = 0; + std::tie(output_width, output_height) = scaled_dimensions(input_shape.x(), input_shape.y(), weights_shape.x(), weights_shape.y(), conv_info); + + TensorShape output_shape{ input_shape }; + output_shape.set(0, output_width); + output_shape.set(1, output_height); + + return output_shape; +} } // namespace shape_calculator } // namespace misc } // namespace arm_compute |