aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2022-11-21 21:46:50 +0000
committerGunes Bayir <gunes.bayir@arm.com>2022-11-28 15:02:59 +0000
commit7dc0234331f2150a6b4ac5c2b49de419870f7cf5 (patch)
tree4e514ce8dd98f022fcbde32ca756ddda375cab8c /utils
parent5d01681fe9aa8a04bd5431db9b2866b8d538dbae (diff)
downloadComputeLibrary-7dc0234331f2150a6b4ac5c2b49de419870f7cf5.tar.gz
Implement FP32/16 Depthwise Conv2d operator in dynamic fusion
This patch adds Depthwise Conv2d operator into dynamic fusion interface and adds the associated tests. Resolves: COMPMID-5517 Change-Id: I385c94dff7fd40c72b8337ef797e508df4499a82 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8678 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 8b50e9d1ef..2ca7ab9b7f 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -39,6 +39,7 @@
#include "arm_compute/core/experimental/IPostOp.h"
#include "arm_compute/core/experimental/PostOps.h"
#include "arm_compute/dynamic_fusion/sketch/OperatorAttributes.h"
+#include "arm_compute/dynamic_fusion/sketch/attributes/DepthwiseConv2dAttributes.h"
#include "arm_compute/runtime/CL/CLTunerTypes.h"
#include "arm_compute/runtime/CL/CLTypes.h"
#include "arm_compute/runtime/FunctionDescriptors.h"
@@ -3412,7 +3413,7 @@ inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynami
<< "["
<< "Padding=" << conv2d_attr.pad() << ", "
<< "Size2D=" << conv2d_attr.stride() << ", "
- << "Dialation=" << conv2d_attr.dilation() << "]";
+ << "Dilation=" << conv2d_attr.dilation() << "]";
return os;
}
@@ -3428,6 +3429,39 @@ inline std::string to_string(const experimental::dynamic_fusion::Conv2dAttribute
str << conv2d_attr;
return str.str();
}
+
+/** Formatted output of the arm_compute::experimental::dynamic_fusion::DepthwiseConv2dAttributes type.
+ *
+ * @param[out] os Output stream.
+ * @param[in] dw_conv2d_attr arm_compute::experimental::dynamic_fusion::DepthwiseConv2dAttributes type to output.
+ *
+ * @return Modified output stream.
+ */
+inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynamic_fusion::DepthwiseConv2dAttributes &dw_conv2d_attr)
+{
+ os << "DepthwiseConv2dAttributes="
+ << "["
+ << "Padding=" << dw_conv2d_attr.pad() << ", "
+ << "Size2D=" << dw_conv2d_attr.stride() << ", "
+ << "Depth Multiplier=" << dw_conv2d_attr.depth_multiplier() << ", "
+ << "Dilation=" << dw_conv2d_attr.dilation() << ","
+ << "DimensionRoundingType: " << dw_conv2d_attr.dimension_rounding_type() << "]";
+
+ return os;
+}
+/** Formatted output of the arm_compute::experimental::dynamic_fusion::DepthwiseConv2dAttributes type.
+ *
+ * @param[in] dw_conv2d_attr arm_compute::experimental::dynamic_fusion::DepthwiseConv2dAttributes type to output.
+ *
+ * @return Formatted string.
+ */
+inline std::string to_string(const experimental::dynamic_fusion::DepthwiseConv2dAttributes &dw_conv2d_attr)
+{
+ std::stringstream str;
+ str << dw_conv2d_attr;
+ return str.str();
+}
+
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */