Implement Logits1DMaxShiftExpSum kernel component in dynamic fusion
Resolves: COMPMID-5719
Change-Id: I2f0911ffccce2b42a9a63fe6826eaa5d2cad06ba
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8831
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index d056bfb..a31a0e5 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 @@
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__ */