From 1e2af2acc4cb789ba4c0e6935a4581ce4a050609 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 15 Oct 2020 17:39:41 +0100 Subject: COMPMID-3712 Remove OpenCL padding: CLDepthwiseConvolutionLayer3x3NHWCKernel FP16/32 Removed unused N from partial block loading macro Created utility to assert change in padding Signed-off-by: Giorgio Arena Change-Id: Ifdd30c66dbf5f2842c6b2d939000613d5011708e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4192 Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- arm_compute/core/Utils.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arm_compute/core/Utils.h') diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index d2bc50c7c6..590bdf93c0 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -38,11 +38,14 @@ #include #include #include +#include #include #include namespace arm_compute { +class ITensor; + /** Calculate the rounded up quotient of val / m. * * @param[in] val Value to divide and round up. @@ -1091,6 +1094,21 @@ std::string string_from_pixel_value(const PixelValue &value, const DataType data * @return DataType */ DataType data_type_from_name(const std::string &name); +/** Stores padding information before configuring a kernel + * + * @param[in] tensors list of tensors to store the padding info for + * + * @return An unordered map where each tensor pointer is paired with its original padding info + */ +std::unordered_map get_padding_info(std::initializer_list tensors); +/** Check if the previously stored padding info has changed after configuring a kernel + * + * @param[in] padding_map an unordered map where each tensor pointer is paired with its original padding info + * + * @return true if any of the tensors has changed its paddings + */ +bool has_padding_changed(const std::unordered_map &padding_map); + /** Input Stream operator for @ref DataType * * @param[in] stream Stream to parse -- cgit v1.2.1