From 55e167814d462a803dbac82db17603cbe1258b4f Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Tue, 15 Jan 2019 13:21:57 +0000 Subject: COMPMID-1724: CL Implement Prod fix Change-Id: I9cf07afe6198e3364ede06faaa9a09a782a34792 Reviewed-on: https://review.mlplatform.org/519 Tested-by: Arm Jenkins Reviewed-by: Michalis Spyrou --- src/runtime/CL/functions/CLDepthConcatenateLayer.cpp | 4 ++-- src/runtime/CL/functions/CLNormalizationLayer.cpp | 4 ++-- src/runtime/CL/functions/CLReductionOperation.cpp | 4 ++-- src/runtime/CL/functions/CLWinogradInputTransform.cpp | 4 ++-- src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp | 4 ++-- src/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.cpp | 4 ++-- .../GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp | 4 ++-- src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp | 4 ++-- src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp | 4 ++-- src/runtime/NEON/functions/NEIntegralImage.cpp | 2 +- tests/CL/Helper.h | 8 ++++---- tests/NEON/Helper.h | 4 ++-- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/runtime/CL/functions/CLDepthConcatenateLayer.cpp b/src/runtime/CL/functions/CLDepthConcatenateLayer.cpp index b5e8fd96d0..e46647a20c 100644 --- a/src/runtime/CL/functions/CLDepthConcatenateLayer.cpp +++ b/src/runtime/CL/functions/CLDepthConcatenateLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -66,7 +66,7 @@ void CLDepthConcatenateLayer::configure(const std::vector &inputs_v for(unsigned int i = 0; i < _num_inputs; i++) { _concat_kernels_vector[i].configure(inputs_vector.at(i), depth_offset, output); - _border_handlers_vector[i].configure(inputs_vector.at(i), _concat_kernels_vector[i].border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handlers_vector[i].configure(inputs_vector.at(i), _concat_kernels_vector[i].border_size(), BorderMode::CONSTANT, PixelValue()); depth_offset += inputs_vector.at(i)->info()->dimension(2); } diff --git a/src/runtime/CL/functions/CLNormalizationLayer.cpp b/src/runtime/CL/functions/CLNormalizationLayer.cpp index 32d8f15344..8489fab68b 100644 --- a/src/runtime/CL/functions/CLNormalizationLayer.cpp +++ b/src/runtime/CL/functions/CLNormalizationLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -45,7 +45,7 @@ void CLNormalizationLayer::configure(ICLTensor *input, ICLTensor *output, const _norm_kernel.configure(input, output, norm_info); // Fill the border by 3 elements since we need vload4 in the IN_MAP normalization kernel - _border_handler.configure(input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue()); } Status CLNormalizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const NormalizationLayerInfo &norm_info) diff --git a/src/runtime/CL/functions/CLReductionOperation.cpp b/src/runtime/CL/functions/CLReductionOperation.cpp index e2dec6b375..3d82e3f0d9 100644 --- a/src/runtime/CL/functions/CLReductionOperation.cpp +++ b/src/runtime/CL/functions/CLReductionOperation.cpp @@ -165,13 +165,13 @@ void CLReductionOperation::configure(ICLTensor *input, ICLTensor *output, unsign first_kernel_op = ReductionOperation::SUM; intermediate_kernel_op = ReductionOperation::SUM; last_kernel_op = op; - pixelValue = PixelValue(0); + pixelValue = PixelValue(); break; case ReductionOperation::SUM_SQUARE: first_kernel_op = ReductionOperation::SUM_SQUARE; intermediate_kernel_op = ReductionOperation::SUM; last_kernel_op = ReductionOperation::SUM; - pixelValue = PixelValue(0); + pixelValue = PixelValue(); break; case ReductionOperation::PROD: first_kernel_op = ReductionOperation::PROD; diff --git a/src/runtime/CL/functions/CLWinogradInputTransform.cpp b/src/runtime/CL/functions/CLWinogradInputTransform.cpp index 09e84564e2..7361eb2baa 100644 --- a/src/runtime/CL/functions/CLWinogradInputTransform.cpp +++ b/src/runtime/CL/functions/CLWinogradInputTransform.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -35,7 +35,7 @@ void CLWinogradInputTransform::configure(ICLTensor *input, ICLTensor *output, co auto k = arm_compute::support::cpp14::make_unique(); k->configure(input, output, winograd_info); _kernel = std::move(k); - _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue()); } Status CLWinogradInputTransform::validate(const ITensorInfo *input, const ITensorInfo *output, const WinogradInfo &winograd_info) diff --git a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp index c58d184afa..a35a18a3d4 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -170,7 +170,7 @@ void GCConvolutionLayer::configure(const IGCTensor *input, const IGCTensor *weig { BorderSize border_size = BorderSize(conv_info.pad_top(), conv_info.pad_right(), conv_info.pad_bottom(), conv_info.pad_left()); input->info()->extend_padding(border_size); - _fill_border.configure(input, border_size, BorderMode::CONSTANT, PixelValue(0)); // for PAD of im2col fp16: consider it as border + _fill_border.configure(input, border_size, BorderMode::CONSTANT, PixelValue()); // for PAD of im2col fp16: consider it as border } // Configure im2col _input_im2col_kernel.configure(input, &_input_im2col_reshaped, Size2D(kernel_width, kernel_height), conv_info, append_bias, dilation); diff --git a/src/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.cpp index 689d8bee81..aa937a66b4 100755 --- a/src/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCDepthConcatenateLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -53,7 +53,7 @@ void GCDepthConcatenateLayer::configure(std::vector inputs_vector, for(unsigned int i = 0; i < _num_inputs; i++) { _concat_kernels_vector[i].configure(inputs_vector.at(i), depth_offset, output); - _border_handlers_vector[i].configure(inputs_vector.at(i), _concat_kernels_vector[i].border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handlers_vector[i].configure(inputs_vector.at(i), _concat_kernels_vector[i].border_size(), BorderMode::CONSTANT, PixelValue()); depth_offset += inputs_vector.at(i)->info()->dimension(2); } diff --git a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp index d9aa50d9e1..ba05838920 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -43,7 +43,7 @@ void GCDepthwiseConvolutionLayer3x3::configure(IGCTensor *input, const IGCTensor _kernel = std::move(k); // Configure border handler - _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue()); _shift_handler.configure(input); diff --git a/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp index c0cf09836f..cb14b8a10b 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -68,7 +68,7 @@ void GCDirectConvolutionLayer::configure(IGCTensor *input, const IGCTensor *weig return; } - _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue()); _shift_handler.configure(input); } diff --git a/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp b/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp index b2e69ee8c6..2569365dce 100644 --- a/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp +++ b/src/runtime/GLES_COMPUTE/functions/GCNormalizationLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -48,7 +48,7 @@ void GCNormalizationLayer::configure(const IGCTensor *input, IGCTensor *output, _norm_kernel.configure(input, &_squared_input, output, norm_info); _multiply_kernel.configure(input, input, &_squared_input, 1.0f); // Fill the border by 3 elements since we need vload4 in the IN_MAP normalization kernel - _border_handler.configure(&_squared_input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(&_squared_input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue()); // Allocate intermediate buffers _squared_input.allocator()->allocate(); diff --git a/src/runtime/NEON/functions/NEIntegralImage.cpp b/src/runtime/NEON/functions/NEIntegralImage.cpp index 43308fa169..8645b43d8d 100644 --- a/src/runtime/NEON/functions/NEIntegralImage.cpp +++ b/src/runtime/NEON/functions/NEIntegralImage.cpp @@ -36,5 +36,5 @@ void NEIntegralImage::configure(const ITensor *input, ITensor *output) auto k = arm_compute::support::cpp14::make_unique(); k->configure(input, output); _kernel = std::move(k); - _border_handler.configure(output, _kernel->border_size(), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(output, _kernel->border_size(), BorderMode::CONSTANT, PixelValue()); } diff --git a/tests/CL/Helper.h b/tests/CL/Helper.h index 88e716726a..ab2f8ccb22 100644 --- a/tests/CL/Helper.h +++ b/tests/CL/Helper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -80,7 +80,7 @@ public: auto k = arm_compute::support::cpp14::make_unique(); k->configure(first, std::forward(args)...); _kernel = std::move(k); - _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue()); } }; @@ -102,8 +102,8 @@ public: k->set_target(CLScheduler::get().target()); k->configure(first, second, std::forward(args)...); _kernel = std::move(k); - _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue(0)); - _memset_kernel.configure(second, PixelValue(0)); + _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue()); + _memset_kernel.configure(second, PixelValue()); } // Inherited method overridden: diff --git a/tests/NEON/Helper.h b/tests/NEON/Helper.h index b9f961243a..c30cbc9ca9 100644 --- a/tests/NEON/Helper.h +++ b/tests/NEON/Helper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -84,7 +84,7 @@ public: auto k = arm_compute::support::cpp14::make_unique(); k->configure(first, std::forward(args)...); _kernel = std::move(k); - _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue(0)); + _border_handler.configure(first, BorderSize(bordersize), BorderMode::CONSTANT, PixelValue()); } }; -- cgit v1.2.1