未验证 提交 1f3e6ec4 编写于 作者: X xingmingyyj 提交者: GitHub

Order print attribute map (#55518)

* fix_ir_printer

* Update ir_printer.cc

* Update ir_printer.cc

* Update ir_printer.cc

* Update ir_printer.cc

* Update ir_printer.cc

* Update paddle/ir/core/ir_printer.cc
Co-authored-by: Nkangguangli <kangguangli@hotmail.com>

* Update ir_printer.cc

---------
Co-authored-by: Nkangguangli <kangguangli@hotmail.com>
上级 bd60757d
......@@ -215,11 +215,14 @@ void IrPrinter::PrintOpResult(const Operation* op) {
}
void IrPrinter::PrintAttributeMap(const Operation* op) {
AttributeMap attributes = op->attributes();
std::map<std::string, Attribute, std::less<std::string>> order_attributes(
attributes.begin(), attributes.end());
os << " {";
PrintInterleave(
op->attributes().begin(),
op->attributes().end(),
order_attributes.begin(),
order_attributes.end(),
[this](std::pair<std::string, Attribute> it) {
this->os << it.first;
this->os << ":";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册