Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions paddle/pir/src/core/ir_printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string>
#include <unordered_map>

#include "paddle/fluid/framework/op_proto_maker.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

依赖fluid目录下的文件感觉不太好,要不就在这个文件里新定义个常量吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改~

#include "paddle/pir/include/core/block.h"
#include "paddle/pir/include/core/builtin_attribute.h"
#include "paddle/pir/include/core/builtin_type.h"
Expand Down Expand Up @@ -279,6 +280,11 @@ void IrPrinter::PrintAttributeMap(Operation* op) {
AttributeMap attributes = op->attributes();
std::map<std::string, Attribute, std::less<>> order_attributes(
attributes.begin(), attributes.end());

// Filter out the callstack attribute
order_attributes.erase(
paddle::framework::OpProtoAndCheckerMaker::OpCreationCallstackAttrName());

os << " {";

pir::detail::PrintInterleave(
Expand Down