From aecb5d93225deace061cb7038d5844eec32c4e52 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Sun, 18 Dec 2022 21:31:29 +0000 Subject: Implement Logits1DMaxShiftExpSum kernel component in dynamic fusion Resolves: COMPMID-5719 Change-Id: I2f0911ffccce2b42a9a63fe6826eaa5d2cad06ba Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8831 Comments-Addressed: Arm Jenkins Reviewed-by: Gian Marco Iodice Reviewed-by: Viet-Hoa Do Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- utils/TypePrinter.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index d056bfbcf4..a31a0e559b 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -43,6 +43,7 @@ #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/dynamic_fusion/sketch/attributes/SoftmaxAttributes.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/CLTypes.h" #include "arm_compute/runtime/FunctionDescriptors.h" @@ -3557,6 +3558,35 @@ inline std::string to_string(const experimental::dynamic_fusion::ResizeAttribute return str.str(); } +/** Formatted output of the arm_compute::experimental::dynamic_fusion::SoftmaxAttributes type. + * + * @param[out] os Output stream. + * @param[in] softmax_attr arm_compute::experimental::dynamic_fusion::SoftmaxAttributes type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynamic_fusion::SoftmaxAttributes &softmax_attr) +{ + os << "SofmtaxAttributes=" + << "[" + << "Beta=" << softmax_attr.beta() << ", " + << "Is Log Softmax=" << softmax_attr.is_log_softmax() << ", " + << "Axis=" << softmax_attr.axis() << "]"; + return os; +} +/** Formatted output of the arm_compute::experimental::dynamic_fusion::SoftmaxAttributes type. + * + * @param[in] softmax_attr arm_compute::experimental::dynamic_fusion::SoftmaxAttributes type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const experimental::dynamic_fusion::SoftmaxAttributes &softmax_attr) +{ + std::stringstream str; + str << softmax_attr; + return str.str(); +} + } // namespace arm_compute #endif /* __ARM_COMPUTE_TYPE_PRINTER_H__ */ -- cgit v1.2.1