未验证 提交 9189a6b4 编写于 作者: Y Yuanle Liu 提交者: GitHub

[IR] adjust some API name (#54331)

* adjust some API name

* fix inference.a undefined reference to utf8proc
上级 755a280e
......@@ -116,7 +116,7 @@ void PaddleDialect::PrintType(ir::Type type, std::ostream &os) {
os << d;
os << "x";
}
tensor_type.dtype().print(os);
tensor_type.dtype().Print(os);
os << ">";
}
......
......@@ -33,7 +33,7 @@ endif()
# fluid_modules exclude API-interface of inference/api and inference/capi_exp
get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
get_property(phi_modules GLOBAL PROPERTY PHI_MODULES)
set(utils_modules pretty_log string_helper benchmark)
set(utils_modules pretty_log string_helper benchmark utf8proc)
add_subdirectory(api)
......
......@@ -233,7 +233,7 @@ class IRPrinter : public BasicIRPrinter {
std::unordered_map<const void*, std::string> aliases_;
};
void Program::print(std::ostream& os) {
void Program::Print(std::ostream& os) {
IRPrinter printer(os);
printer.PrintProgram(this);
}
......@@ -243,7 +243,7 @@ void Operation::Print(std::ostream& os) {
printer.PrintOperation(this);
}
void Type::print(std::ostream& os) const {
void Type::Print(std::ostream& os) const {
BasicIRPrinter printer(os);
printer.PrintType(*this);
}
......
......@@ -50,7 +50,7 @@ class Program {
ModuleOp module_op() { return module_; }
void print(std::ostream& os);
void Print(std::ostream& os);
Block* block() { return module_.block(); }
......
......@@ -19,7 +19,7 @@ namespace ir {
IrContext* Type::ir_context() const { return dialect().ir_context(); }
std::ostream& operator<<(std::ostream& os, Type type) {
type.print(os);
type.Print(os);
return os;
}
......
......@@ -78,7 +78,7 @@ class Type {
return ir::dyn_cast<U>(*this);
}
void print(std::ostream &os) const;
void Print(std::ostream &os) const;
///
/// \brief Enable hashing Type.
......
......@@ -231,7 +231,7 @@ TEST(program_test, program) {
EXPECT_EQ(program.block()->size() == 4, true);
EXPECT_EQ(program.parameters_num() == 3, true);
program.print(std::cout);
program.Print(std::cout);
}
TEST(program_test, slice_combine_test) {
......
......@@ -59,5 +59,5 @@ TEST(PaddleDialectTest, Translator) {
// ops.size() = op size in BlockDesc + get_parameter_op + combine op
EXPECT_EQ(op_size, p.Block(0).OpSize() + program->parameters_num() + 21);
std::cout << *program << std::endl;
program->Print(std::cout);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册