Skip to content

Commit

Permalink
BroadcastOp::toString() show broadcast flags as well (#3641)
Browse files Browse the repository at this point in the history
For disambiguation

---------

Co-authored-by: Jacob Hinkle <[email protected]>
  • Loading branch information
naoyam and jacobhinkle authored Dec 24, 2024
1 parent e214d37 commit c7f40b7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion csrc/ir/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit c7f40b7

Please sign in to comment.