aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorGiorgio Arena <giorgio.arena@arm.com>2020-10-15 17:39:41 +0100
committerGiorgio Arena <giorgio.arena@arm.com>2020-10-21 13:13:53 +0000
commit1e2af2acc4cb789ba4c0e6935a4581ce4a050609 (patch)
tree32aacf11e7f5deb271e2177f36920b57c9afa5ab /arm_compute
parented5fb39d1d9d3e56d26b621cd1d56ceb39270701 (diff)
downloadComputeLibrary-1e2af2acc4cb789ba4c0e6935a4581ce4a050609.tar.gz
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 <giorgio.arena@arm.com> Change-Id: Ifdd30c66dbf5f2842c6b2d939000613d5011708e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4192 Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h1
-rw-r--r--arm_compute/core/Types.h22
-rw-r--r--arm_compute/core/Utils.h18
3 files changed, 40 insertions, 1 deletions
diff --git a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h
index 4ca6c0bf4a..db57439de0 100644
--- a/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h
+++ b/arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h
@@ -107,7 +107,6 @@ public:
BorderSize border_size() const override;
private:
- unsigned int _num_rows_processed_per_iteration;
unsigned int _num_planes_processed_per_iteration;
};
} // namespace arm_compute
diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h
index c0e0683fe6..42e42cc2d6 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -337,6 +337,28 @@ struct BorderSize
return size;
}
+ /** Check equality with another BorderSize struct
+ *
+ * @param[in] rhs other struct to check against
+ *
+ * @return true if they are equal
+ */
+ bool operator==(const BorderSize &rhs)
+ {
+ return (top == rhs.top) && (right == rhs.right) && (bottom == rhs.bottom) && (left == rhs.left);
+ }
+
+ /** Check non-equality with another BorderSize struct
+ *
+ * @param[in] rhs other struct to check against
+ *
+ * @return true if they are different
+ */
+ bool operator!=(const BorderSize &rhs)
+ {
+ return !(*this == rhs);
+ }
+
/** Limit this border size.
*
* @param[in] limit Border size to limit this border size to.
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 <sstream>
#include <string>
#include <type_traits>
+#include <unordered_map>
#include <utility>
#include <vector>
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<const ITensor *, PaddingSize> get_padding_info(std::initializer_list<const ITensor *> 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<const ITensor *, PaddingSize> &padding_map);
+
/** Input Stream operator for @ref DataType
*
* @param[in] stream Stream to parse