diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-10-27 12:01:23 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 5cbd20f10f1a51dc177c4e9e7c0be01261870260 (patch) | |
tree | 4df16a37d88d5fa3434c64a7e8a788eeb431dfe1 /src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp | |
parent | 1f378ee7639837601f5152ee9f185ee1a528d643 (diff) | |
download | ComputeLibrary-5cbd20f10f1a51dc177c4e9e7c0be01261870260.tar.gz |
COMPMID-556: Autoconfigure support in CLDepthwiseConvolution.
Change-Id: I697d3237b39d0f088b820c14b65cfcbbd2e26e09
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93412
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLDepthwiseVectorToTensorKernel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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); |