From d0b7b4b1ce489058ea3ad34e29f94d568b4d64eb Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Tue, 9 Mar 2021 10:47:30 +0000 Subject: Remove valid region calculation from CpuElementwise Valid region calculation has been removed before but used unintentionally while adding dynamic tensor shape support to CpuElementwiseKernel. Remove it to eliminate valid region calculation on CPU side. Implements: COMPMID-4217 Change-Id: Ide161bdf9de81a7feabe1e631682945ca8ab0aa4 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5242 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins --- src/runtime/cpu/operators/CpuElementwise.cpp | 2 +- src/runtime/cpu/operators/CpuElementwiseUnary.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/runtime/cpu') diff --git a/src/runtime/cpu/operators/CpuElementwise.cpp b/src/runtime/cpu/operators/CpuElementwise.cpp index b5c8dde925..5457825bd5 100644 --- a/src/runtime/cpu/operators/CpuElementwise.cpp +++ b/src/runtime/cpu/operators/CpuElementwise.cpp @@ -40,7 +40,7 @@ void CpuElementwiseBase::run(ITensorPack &tensors) auto src0_info = tensors.get_const_tensor(TensorType::ACL_SRC_0)->info(); auto src1_info = tensors.get_const_tensor(TensorType::ACL_SRC_1)->info(); - auto shape_and_window = compute_output_shape_and_window(*src0_info, *src1_info); + auto shape_and_window = compute_output_shape_and_window(src0_info->tensor_shape(), src1_info->tensor_shape()); ICpuOperator::run(tensors, shape_and_window.second); } diff --git a/src/runtime/cpu/operators/CpuElementwiseUnary.cpp b/src/runtime/cpu/operators/CpuElementwiseUnary.cpp index 2140c5cf78..c79e6e9acf 100644 --- a/src/runtime/cpu/operators/CpuElementwiseUnary.cpp +++ b/src/runtime/cpu/operators/CpuElementwiseUnary.cpp @@ -52,7 +52,7 @@ void CpuElementwiseUnary::run(ITensorPack &tensors) } auto src_info = tensors.get_const_tensor(TensorType::ACL_SRC)->info(); - ICpuOperator::run(tensors, compute_output_shape_and_window(*src_info).second); + ICpuOperator::run(tensors, compute_output_shape_and_window(src_info->tensor_shape()).second); } } // namespace cpu } // namespace arm_compute \ No newline at end of file -- cgit v1.2.1