diff options
author | SiCongLi <sicong.li@arm.com> | 2021-02-22 14:28:33 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2021-03-08 09:39:03 +0000 |
commit | c7b1e84ac5f3ada1b2f78c66979ef4d44804a955 (patch) | |
tree | 3f2dd18121727cf8000a84ed0030523ce7c0e91e /src/core/cpu/kernels/CpuElementwiseKernel.cpp | |
parent | b861074c74ea99222207a4a0a71954f8852f8704 (diff) | |
download | ComputeLibrary-c7b1e84ac5f3ada1b2f78c66979ef4d44804a955.tar.gz |
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 <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5202
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/cpu/kernels/CpuElementwiseKernel.cpp')
-rw-r--r-- | src/core/cpu/kernels/CpuElementwiseKernel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<TensorShape, ValidRegion> 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); } |