From 8ae571454792327fc40641c72fe0b8de1e7d334f Mon Sep 17 00:00:00 2001 From: Jakub Sujak Date: Fri, 2 Dec 2022 16:09:06 +0000 Subject: Add Resize/Scale operator to Dynamic Fusion interface Resolves: COMPMID-5521 Change-Id: Id38a4ce18f9ea8805a151acb064e72795535d1a0 Signed-off-by: Jakub Sujak Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8859 Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Benchmark: Arm Jenkins --- utils/TypePrinter.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index d4265bfdbd..d056bfbcf4 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -42,6 +42,7 @@ #include "arm_compute/dynamic_fusion/sketch/attributes/CastAttributes.h" #include "arm_compute/dynamic_fusion/sketch/attributes/ClampAttributes.h" #include "arm_compute/dynamic_fusion/sketch/attributes/DepthwiseConv2dAttributes.h" +#include "arm_compute/dynamic_fusion/sketch/attributes/ResizeAttributes.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/CLTypes.h" #include "arm_compute/runtime/FunctionDescriptors.h" @@ -3524,6 +3525,38 @@ inline std::string to_string(const experimental::dynamic_fusion::ClampAttributes return str.str(); } +/** Formatted output of the arm_compute::experimental::dynamic_fusion::ResizeAttributes type. + * + * @param[out] os Output stream. + * @param[in] resize_attr arm_compute::experimental::dynamic_fusion::ResizeAttributes type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynamic_fusion::ResizeAttributes &resize_attr) +{ + os << "ResizeAttributes=" + << "[" + << "AlignCorners=" << resize_attr.align_corners() << ", " + << "InterpolationPolicy=" << resize_attr.interpolation_policy() << ", " + << "OutputHeight=" << resize_attr.output_height() << ", " + << "OutputWidth=" << resize_attr.output_width() << ", " + << "SamplingPolicy=" << resize_attr.sampling_policy() << "]"; + return os; +} + +/** Formatted output of the arm_compute::experimental::dynamic_fusion::ResizeAttributes type. + * + * @param[in] resize_attr arm_compute::experimental::dynamic_fusion::ResizeAttributes type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const experimental::dynamic_fusion::ResizeAttributes &resize_attr) +{ + std::stringstream str; + str << resize_attr; + return str.str(); +} + } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ -- cgit v1.2.1