From 5cbd20f10f1a51dc177c4e9e7c0be01261870260 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Fri, 27 Oct 2017 12:01:23 +0100 Subject: COMPMID-556: Autoconfigure support in CLDepthwiseConvolution. Change-Id: I697d3237b39d0f088b820c14b65cfcbbd2e26e09 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93412 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp') diff --git a/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp b/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp index 2086b1de03..dc47bb0adc 100644 --- a/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp @@ -42,6 +42,17 @@ CLDepthwiseVectorToTensorKernel::CLDepthwiseVectorToTensorKernel() void CLDepthwiseVectorToTensorKernel::configure(const ICLTensor *input, ICLTensor *output, size_t conv_w, size_t conv_h) { ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32); + ARM_COMPUTE_ERROR_ON_NULLPTR(output); + + TensorShape output_shape = input->info()->tensor_shape(); + output_shape.set(0, conv_w); + output_shape.set(1, conv_h); + output_shape.set(2, input->info()->tensor_shape()[0] / (conv_w * conv_h)); + + // Output auto inizialitation if not yet initialized + auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(), input->info()->fixed_point_position()); + + ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output); -- cgit v1.2.1