From e4563a032aaa71de5efdb83fc04ff2933338e02d Mon Sep 17 00:00:00 2001 From: Adnan AlSinan Date: Wed, 1 Sep 2021 15:32:03 +0100 Subject: Adds Conv3d reference implementation support. Expands the interface with the following items: - Size3D Class. - Conv3dInfo Struct. - Padding3D Struct. - Add 'NDHWC' to supported Tensor Data Layouts. - Add function to compute expected size of Conv3d. Resolves COMPMID-4658 & COMPMID-4657 Signed-off-by: Adnan AlSinan Change-Id: Ic7452c48461eedaa38eaf3ac458f54b031e7dfa8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6187 Reviewed-by: Giorgio Arena Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- arm_compute/core/Types.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arm_compute/core/Types.h') diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index 36b77b8224..31199e138b 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -27,6 +27,7 @@ #include "arm_compute/core/Coordinates.h" #include "arm_compute/core/QuantizationInfo.h" #include "arm_compute/core/Size2D.h" +#include "arm_compute/core/Size3D.h" #include "arm_compute/core/Strides.h" #include "arm_compute/core/TensorShape.h" #include "arm_compute/core/utils/misc/Macros.h" @@ -112,7 +113,8 @@ enum class DataLayout { UNKNOWN, /**< Unknown data layout */ NCHW, /**< Num samples, channels, height, width */ - NHWC /**< Num samples, height, width, channels */ + NHWC, /**< Num samples, height, width, channels */ + NDHWC /**< Num samples, depth, height, width, channels */ }; /** [DataLayout enum definition] **/ @@ -760,6 +762,17 @@ private: DimensionRoundingType _round_type; }; +/** Padding information for 3D operations like Conv3d */ +struct Padding3D +{ + size_t left = { 0 }; /**< Padding across the width dimenstion on the left, in elements. */ + size_t right = { 0 }; /**< Padding across the width dimenstion on the right, in elements. */ + size_t top = { 0 }; /**< Padding across the height dimenstion on the top, in elements. */ + size_t bottom = { 0 }; /**< Padding across the height dimenstion on the bottom, in elements. */ + size_t front = { 0 }; /**< Padding across the depth dimenstion on the front, in elements. */ + size_t back = { 0 }; /**< Padding across the depth dimenstion on the back, in elements. */ +}; + /** PriorBox layer info */ class PriorBoxLayerInfo final { -- cgit v1.2.1