From c7f40b75fe64975400e2351ef7a029bb2867aab2 Mon Sep 17 00:00:00 2001 From: Naoya Maruyama Date: Mon, 23 Dec 2024 17:15:18 -0800 Subject: [PATCH] BroadcastOp::toString() show broadcast flags as well (#3641) For disambiguation --------- Co-authored-by: Jacob Hinkle <1454944+jacobhinkle@users.noreply.github.com> --- csrc/ir/nodes.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/csrc/ir/nodes.cpp b/csrc/ir/nodes.cpp index fd021239f93..5f0528991b2 100644 --- a/csrc/ir/nodes.cpp +++ b/csrc/ir/nodes.cpp @@ -1268,7 +1268,17 @@ BroadcastOp::BroadcastOp( std::string BroadcastOp::toString(int indent_size) const { std::stringstream ss; indent(ss, indent_size) << out()->toString() << "\n"; - indent(ss, indent_size) << " = broadcast( " << in()->toString() << " )\n"; + indent(ss, indent_size) << " = broadcast( " << in()->toString() + << ", flags = {"; + bool is_first = true; + for (const auto f : getBroadcastDimFlags()) { + if (!is_first) { + ss << ", "; + } + ss << (f ? "true" : "false"); + is_first = false; + } + ss << "} )\n"; return ss.str(); }