Remove usage of valid window region in NHWC CPU kernels - Part2
Remove set_valid_region methods from all NHWC CPU ML functions /
operators / kernels
Resolves COMPMID-4152 (2/2)
Change-Id: If9725e9c5b0213b87db96675e81b7fb724970b98
Signed-off-by: SiCongLi <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5203
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
index 109652fb..44d6009 100644
--- a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
+++ b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
@@ -71,7 +71,7 @@
return Status{};
}
-std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output)
+std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input)
{
Window window = calculate_max_window(*input, Steps());
window.set(Window::DimX, Window::Dimension(0, input->dimension(0), input->dimension(0)));
@@ -79,7 +79,6 @@
window.set(Window::DimZ, Window::Dimension(0, input->dimension(2), input->dimension(2)));
// The NEConvolutionLayerWeightsReshapeKernel doesn't need padding so update_window_and_padding() can be skipped
- output->set_valid_region(ValidRegion(Coordinates(), output->tensor_shape()));
return std::make_pair(Status{}, window);
}
@@ -107,7 +106,7 @@
_output = output;
// Configure kernel
- auto win_config = validate_and_configure_window(input->info(), output->info());
+ auto win_config = validate_and_configure_window(input->info());
ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
INEKernel::configure(win_config.second);
}
@@ -115,7 +114,7 @@
Status NEWeightsReshapeKernel::validate(const ITensorInfo *input, const ITensorInfo *biases, const ITensorInfo *output)
{
ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, biases, output));
- ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), output->clone().get()).first);
+ ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get()).first);
return Status{};
}