From c7b1e84ac5f3ada1b2f78c66979ef4d44804a955 Mon Sep 17 00:00:00 2001 From: SiCongLi Date: Mon, 22 Feb 2021 14:28:33 +0000 Subject: Remove usage of valid window region in NHWC CPU kernels - Part1 Replace all calculate_max_window(ValidRegion, ...) with calculate_max_window(TensorShape, ...) in CPU kernels Resolves COMPMID-4152 (1/2) Change-Id: I7403ea6b24b9e7889890839142a06439d6c8a499 Signed-off-by: SiCongLi Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5202 Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- src/core/cpu/kernels/CpuElementwiseKernel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/cpu/kernels/CpuElementwiseKernel.cpp') diff --git a/src/core/cpu/kernels/CpuElementwiseKernel.cpp b/src/core/cpu/kernels/CpuElementwiseKernel.cpp index ab915b9d72..1ac21acbc0 100644 --- a/src/core/cpu/kernels/CpuElementwiseKernel.cpp +++ b/src/core/cpu/kernels/CpuElementwiseKernel.cpp @@ -182,14 +182,12 @@ void CpuElementwiseKernel::configure_common(const ITensorInfo *input1, const ITe ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, output); // Configure kernel window - const std::pair broadcast_pair = ITensorInfo::broadcast_shape_and_valid_region(*input1, *input2); - const TensorShape &out_shape = broadcast_pair.first; - const ValidRegion &valid_region = broadcast_pair.second; + const TensorShape &out_shape = TensorShape::broadcast_shape(input1->tensor_shape(), input2->tensor_shape()); // Auto initialize output if not initialized auto_init_if_empty(*output, out_shape, 1, input1->data_type()); - Window win = calculate_max_window(valid_region); + Window win = calculate_max_window(out_shape); ICpuKernel::configure(win); } -- cgit v1.2.1