aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2022-12-18 21:31:29 +0000
committerGunes Bayir <gunes.bayir@arm.com>2022-12-28 13:36:03 +0000
commitaecb5d93225deace061cb7038d5844eec32c4e52 (patch)
tree111e0cc4b61b9024d47b14c551424c97a2e9dece /utils
parent8ae571454792327fc40641c72fe0b8de1e7d334f (diff)
downloadComputeLibrary-aecb5d93225deace061cb7038d5844eec32c4e52.tar.gz
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>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h30
1 files changed, 30 insertions, 0 deletions
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__ */