diff options
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index f55f72a4b8..8b50e9d1ef 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -38,6 +38,7 @@ #include "arm_compute/core/Types.h" #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/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/CLTypes.h" #include "arm_compute/runtime/FunctionDescriptors.h" @@ -3371,6 +3372,62 @@ inline std::string to_string(const std::tuple<TensorShape, TensorShape, arm_comp return str.str(); } +/** Formatted output of the Padding2D type. + * + * @param[out] os Output stream. + * @param[in] padding2d Padding info for 2D dimension shape. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const Padding2D &padding2d) +{ + os << padding2d.left << "," << padding2d.right << "," + << padding2d.top << "," << padding2d.bottom; + return os; +} + +/** Converts a @ref Padding2D to string + * + * @param[in] padding2d Padding2D value to be converted + * + * @return String representing the corresponding Padding2D + */ +inline std::string to_string(const Padding2D &padding2d) +{ + std::stringstream str; + str << padding2d; + return str.str(); +} + +/** Formatted output of the arm_compute::experimental::dynamic_fusion::Conv2dAttributes type. + * + * @param[out] os Output stream. + * @param[in] conv2d_attr arm_compute::experimental::dynamic_fusion::Conv2dAttributes type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynamic_fusion::Conv2dAttributes &conv2d_attr) +{ + os << "Conv2dAttributes=" + << "[" + << "Padding=" << conv2d_attr.pad() << ", " + << "Size2D=" << conv2d_attr.stride() << ", " + << "Dialation=" << conv2d_attr.dilation() << "]"; + + return os; +} +/** Formatted output of the arm_compute::experimental::dynamic_fusion::Conv2dAttributes type. + * + * @param[in] conv2d_attr arm_compute::experimental::dynamic_fusion::Conv2dAttributes type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const experimental::dynamic_fusion::Conv2dAttributes &conv2d_attr) +{ + std::stringstream str; + str << conv2d_attr; + return str.str(); +} } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ |