aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLFFTScaleKernel.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2021-03-19 15:06:07 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-03-29 19:48:22 +0000
commit702dc0c71f2b2830b63e3b4079ede0ef76377f0a (patch)
treeafb0dacd74a8650350802aea8043822503c2f8b2 /src/core/CL/kernels/CLFFTScaleKernel.cpp
parent26c5c0fc10cbee1b523af0b27f884719dc50820a (diff)
downloadComputeLibrary-702dc0c71f2b2830b63e3b4079ede0ef76377f0a.tar.gz
Remove usage of valid window region CL - NHWC
Resolves: COMPMID-4153 Change-Id: Ib0d60c9acaac8aaf3946c62fc2d740b5ec6cee5c Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5301 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLFFTScaleKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLFFTScaleKernel.cpp34
1 files changed, 10 insertions, 24 deletions
diff --git a/src/core/CL/kernels/CLFFTScaleKernel.cpp b/src/core/CL/kernels/CLFFTScaleKernel.cpp
index edcf5d5a5d..c80f774c6a 100644
--- a/src/core/CL/kernels/CLFFTScaleKernel.cpp
+++ b/src/core/CL/kernels/CLFFTScaleKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020 Arm Limited.
+ * Copyright (c) 2019-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -50,25 +50,6 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output)
return Status{};
}
-
-std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *output)
-{
- // Configure kernel window
- Window win = calculate_max_window(*input, Steps());
-
- if(output != nullptr)
- {
- // Output auto inizialitation if not yet initialized
- auto_init_if_empty(*output, *input->clone());
-
- // CLFFTScaleKernel doesn't need padding so update_window_and_padding() can be skipped
- Coordinates coord;
- coord.set_num_dimensions(output->num_dimensions());
- output->set_valid_region(ValidRegion(coord, output->tensor_shape()));
- }
-
- return std::make_pair(Status{}, win);
-}
} // namespace
CLFFTScaleKernel::CLFFTScaleKernel()
@@ -105,9 +86,15 @@ void CLFFTScaleKernel::configure(const CLCompileContext &compile_context, ICLTen
_kernel.setArg<cl_float>(idx, config.scale);
// Configure kernel window
- auto win_config = validate_and_configure_window(input->info(), _run_in_place ? nullptr : output->info());
- ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
- ICLKernel::configure_internal(win_config.second);
+ Window win = calculate_max_window(*input->info(), Steps());
+
+ if(output != nullptr)
+ {
+ // Output auto inizialitation if not yet initialized
+ auto_init_if_empty(*output->info(), *input->info()->clone());
+ }
+
+ ICLKernel::configure_internal(win);
// Set config_id for enabling LWS tuning
_config_id = kernel_name;
@@ -124,7 +111,6 @@ Status CLFFTScaleKernel::validate(const ITensorInfo *input, const ITensorInfo *o
{
ARM_COMPUTE_UNUSED(config);
ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, output));
- ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), output->clone().get()).first);
return Status{};
}