diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-01-09 15:27:51 +0000 |
---|---|---|
committer | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-01-10 11:12:39 +0000 |
commit | 5b7fd87b6ab73a7206a45d3621d484131c901143 (patch) | |
tree | 27ce6a34e0e4f80de4cfc4aabbd72c43ee58d559 /arm_compute | |
parent | daa3aba64d01fd02fc74d0707d50d2571e5f0ce8 (diff) | |
download | ComputeLibrary-5b7fd87b6ab73a7206a45d3621d484131c901143.tar.gz |
MLCE-139 add align_corners parameter handling to CLScale
Change-Id: I9d6047c306d7928258d5168eb4bfb96b09d2608f
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2569
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/kernels/CLScaleKernel.h | 8 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLScale.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/arm_compute/core/CL/kernels/CLScaleKernel.h b/arm_compute/core/CL/kernels/CLScaleKernel.h index 7d9ed41305..f93286b07d 100644 --- a/arm_compute/core/CL/kernels/CLScaleKernel.h +++ b/arm_compute/core/CL/kernels/CLScaleKernel.h @@ -43,8 +43,9 @@ public: * @param[in] policy Interpolation type to use * @param[in] border_mode Selected border mode. * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER + * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy with TOP_LEFT sampling policy. Defaults to false. */ - void configure(const ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER); + void configure(const ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER, bool align_corners = false); /** Static function to check if given info will lead to a valid configuration of @ref CLScaleKernel * @@ -54,10 +55,12 @@ public: * @param[in] policy Interpolation type to use * @param[in] border_mode Selected border mode. * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER + * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy with TOP_LEFT sampling policy. Defaults to false. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, InterpolationPolicy policy, BorderMode border_mode, SamplingPolicy sampling_policy = SamplingPolicy::CENTER, + bool align_corners = false); /** Input tensor accessor. * * @return Pointer to input tensor. @@ -76,6 +79,7 @@ public: public: InterpolationPolicy _interpolationPolicy = InterpolationPolicy::BILINEAR; DataLayout _data_layout = DataLayout::UNKNOWN; + bool _align_corners = false; }; } // namespace arm_compute #endif /*ARM_COMPUTE_CLSCALEKERNEL_H */ diff --git a/arm_compute/runtime/CL/functions/CLScale.h b/arm_compute/runtime/CL/functions/CLScale.h index 9a201dc10f..c06c9b629a 100644 --- a/arm_compute/runtime/CL/functions/CLScale.h +++ b/arm_compute/runtime/CL/functions/CLScale.h @@ -47,7 +47,7 @@ public: * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER * @param[in] use_padding (Optional) Is padding in use or not. Defaults to true. - * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy. Defaults to false. + * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy with TOP_LEFT sampling policy. Defaults to false. */ void configure(ICLTensor *input, ICLTensor *output, InterpolationPolicy policy, BorderMode border_mode, PixelValue constant_border_value = PixelValue(), SamplingPolicy sampling_policy = SamplingPolicy::CENTER, bool use_padding = true, bool align_corners = false); @@ -62,7 +62,7 @@ public: * @param[in] constant_border_value (Optional) Constant value to use for borders if border_mode is set to CONSTANT. * @param[in] sampling_policy (Optional) Sampling policy used by the interpolation. Defaults to @ref SamplingPolicy::CENTER * @param[in] use_padding (Optional) Is padding in use or not. Defaults to true. - * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy. Defaults to false. + * @param[in] align_corners (Optional) Align corners of input and output, only affecting bilinear policy with TOP_LEFT sampling policy. Defaults to false. * * @return a status */ |