From 226e4b92b191491ffa57ede66eba1d5d6fcf3b76 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 23 Aug 2018 12:00:02 +0100 Subject: COMPMID-1470 Add auto-init of the output in NECol2im The output of NECol2Im is already auto-initialized. This patch is about calling ShapeCalculator instead of computing the shape inside the kernel, adding validate_and_configure_window, and standardize the way convolved dims are passed (now NEON uses Size2D, while CL passes a pair of uint values: using Size2D for both implementations) Change-Id: I795696e1b6532f57847c3186c1b532c09f5a25da Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145345 Tested-by: Jenkins Reviewed-by: Michele DiGiorgio Reviewed-by: Georgios Pinitas --- src/runtime/CL/functions/CLLocallyConnectedLayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/CL/functions/CLLocallyConnectedLayer.cpp') diff --git a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp index 40bf032d69..5c6bef995f 100644 --- a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp +++ b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp @@ -122,7 +122,7 @@ Status CLLocallyConnectedLayer::validate(const ITensorInfo *input, const ITensor ARM_COMPUTE_RETURN_ON_ERROR(CLIm2ColKernel::validate(input, &input_im2col_reshaped_info, Size2D(kernel_width, kernel_height), conv_info, has_bias)); ARM_COMPUTE_RETURN_ON_ERROR(CLWeightsReshapeKernel::validate(weights, biases, &weights_reshaped_info)); ARM_COMPUTE_RETURN_ON_ERROR(CLLocallyConnectedMatrixMultiplyKernel::validate(&input_im2col_reshaped_info, &weights_reshaped_info, &gemm_output_info)); - ARM_COMPUTE_RETURN_ON_ERROR(CLCol2ImKernel::validate(&gemm_output_info, output, std::make_pair(conv_w, conv_h))); + ARM_COMPUTE_RETURN_ON_ERROR(CLCol2ImKernel::validate(&gemm_output_info, output, Size2D(conv_w, conv_h))); return Status{}; } @@ -163,7 +163,7 @@ void CLLocallyConnectedLayer::configure(const ICLTensor *input, const ICLTensor _input_im2col_kernel.configure(input, &_input_im2col_reshaped, Size2D(kernel_width, kernel_height), conv_info, _has_bias); _weights_reshape_kernel.configure(weights, biases, &_weights_reshaped); _mm_kernel.configure(&_input_im2col_reshaped, &_weights_reshaped, &_gemm_output); - _output_col2im_kernel.configure(&_gemm_output, output, std::make_pair(conv_w, conv_h)); + _output_col2im_kernel.configure(&_gemm_output, output, Size2D(conv_w, conv_h)); // Allocate intermediate tensors _input_im2col_reshaped.allocator()->allocate(); -- cgit v1.2.1