aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorramelg01 <ramy.elgammal@arm.com>2022-02-26 22:06:20 +0000
committerRamy Elgammal <ramy.elgammal@arm.com>2022-03-15 16:18:13 +0000
commit375156937a0783432c5d18e199b5d8d2b3ec33f7 (patch)
tree4c755770ac569c286179e5ce40df1c820baa73d8 /utils
parent4e66d707a292b90a344e32c59eb1dacb67a0e4c1 (diff)
downloadComputeLibrary-375156937a0783432c5d18e199b5d8d2b3ec33f7.tar.gz
Implementation of ClPooling3d
- For NDHWC layout - For F16 and F32 data types - Mixed Precision stil not supported Resolves: COMPMID-4670 Signed-off-by: ramy.elgammal@arm.com Change-Id: I0e14a13e4625569e8e5ee67e6033bd1efe0da469 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7262 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h194
1 files changed, 116 insertions, 78 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 664a39d150..dae81e4a5a 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -2083,6 +2083,122 @@ inline std::string to_string(const PoolingLayerInfo &info)
return str.str();
}
+/** Formatted output of the Size3D type.
+ *
+ * @param[out] os Output stream
+ * @param[in] size Type to output
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const Size3D &size)
+{
+ os << size.width << "x" << size.height << "x" << size.depth;
+
+ return os;
+}
+
+/** Formatted output of the Size3D type.
+ *
+ * @param[in] type Type to output
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const Size3D &type)
+{
+ std::stringstream str;
+ str << type;
+ return str.str();
+}
+
+/** Formatted output of the Padding3D type.
+ *
+ * @param[out] os Output stream.
+ * @param[in] padding3d Padding info for 3D spatial dimension shape.
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const Padding3D &padding3d)
+{
+ os << padding3d.left << "," << padding3d.right << ","
+ << padding3d.top << "," << padding3d.bottom << ","
+ << padding3d.front << "," << padding3d.back;
+ return os;
+}
+
+/** Converts a @ref Padding3D to string
+ *
+ * @param[in] padding3d Padding3D value to be converted
+ *
+ * @return String representing the corresponding Padding3D
+ */
+inline std::string to_string(const Padding3D &padding3d)
+{
+ std::stringstream str;
+ str << padding3d;
+ return str.str();
+}
+
+/** Formatted output of the DimensionRoundingType type.
+ *
+ * @param[out] os Output stream.
+ * @param[in] rounding_type DimensionRoundingType Dimension rounding type when down-scaling, or compute output shape of pooling(2D or 3D).
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const DimensionRoundingType &rounding_type)
+{
+ switch(rounding_type)
+ {
+ case DimensionRoundingType::CEIL:
+ os << "CEIL";
+ break;
+ case DimensionRoundingType::FLOOR:
+ os << "FLOOR";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+ return os;
+}
+
+/** Formatted output of the Pooling 3d Layer Info.
+ *
+ * @param[out] os Output stream.
+ * @param[in] info Pooling 3D layer info to print to output stream.
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const Pooling3dLayerInfo &info)
+{
+ os << "{Type=" << info.pool_type << ","
+ << "IsGlobalPooling=" << info.is_global_pooling;
+ if(!info.is_global_pooling)
+ {
+ os << ","
+ << "PoolSize=" << info.pool_size << ", "
+ << "Stride=" << info.stride << ", "
+ << "Padding=" << info.padding << ", "
+ << "Exclude Padding=" << info.exclude_padding << ", "
+ << "fp_mixed_precision=" << info.fp_mixed_precision << ", "
+ << "DimensionRoundingType=" << info.round_type;
+ }
+ os << "}";
+ return os;
+}
+
+/** Formatted output of the Pooling 3d Layer Info.
+ *
+ * @param[in] info Type to output.
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const Pooling3dLayerInfo &info)
+{
+ std::stringstream str;
+ str << info;
+ return str.str();
+}
+
/** Formatted output of the PriorBoxLayerInfo.
*
* @param[in] info Type to output.
@@ -2134,33 +2250,6 @@ inline std::string to_string(const Size2D &type)
return str.str();
}
-/** Formatted output of the Size3D type.
- *
- * @param[out] os Output stream
- * @param[in] size Type to output
- *
- * @return Modified output stream.
- */
-inline ::std::ostream &operator<<(::std::ostream &os, const Size3D &size)
-{
- os << size.width << "x" << size.height << "x" << size.depth;
-
- return os;
-}
-
-/** Formatted output of the Size2D type.
- *
- * @param[in] type Type to output
- *
- * @return Formatted string.
- */
-inline std::string to_string(const Size3D &type)
-{
- std::stringstream str;
- str << type;
- return str.str();
-}
-
/** Formatted output of the ConvolutionMethod type.
*
* @param[out] os Output stream
@@ -3097,29 +3186,6 @@ inline std::string to_string(const BoxNMSLimitInfo &info)
return str.str();
}
-/** Formatted output of the DimensionRoundingType type.
- *
- * @param[out] os Output stream.
- * @param[in] rounding_type DimensionRoundingType to output.
- *
- * @return Modified output stream.
- */
-inline ::std::ostream &operator<<(::std::ostream &os, const DimensionRoundingType &rounding_type)
-{
- switch(rounding_type)
- {
- case DimensionRoundingType::CEIL:
- os << "CEIL";
- break;
- case DimensionRoundingType::FLOOR:
- os << "FLOOR";
- break;
- default:
- ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
- }
- return os;
-}
-
/** Converts a @ref DimensionRoundingType to string
*
* @param[in] rounding_type DimensionRoundingType value to be converted
@@ -3133,34 +3199,6 @@ inline std::string to_string(const DimensionRoundingType &rounding_type)
return str.str();
}
-/** Formatted output of the Padding3D type.
- *
- * @param[out] os Output stream.
- * @param[in] padding3d Padding3D to output.
- *
- * @return Modified output stream.
- */
-inline ::std::ostream &operator<<(::std::ostream &os, const Padding3D &padding3d)
-{
- os << padding3d.left << "," << padding3d.right << ","
- << padding3d.top << "," << padding3d.bottom << ","
- << padding3d.front << "," << padding3d.back;
- return os;
-}
-
-/** Converts a @ref Padding3D to string
- *
- * @param[in] padding3d Padding3D value to be converted
- *
- * @return String representing the corresponding Padding3D
- */
-inline std::string to_string(const Padding3D &padding3d)
-{
- std::stringstream str;
- str << padding3d;
- return str.str();
-}
-
/** Formatted output of the Conv3dInfo type.
*
* @param[out] os Output stream.