diff --git a/paddle/fluid/ir_adaptor/translator/type_translator.h b/paddle/fluid/ir_adaptor/translator/type_translator.h index 255795c92d8071..00b369259718e4 100644 --- a/paddle/fluid/ir_adaptor/translator/type_translator.h +++ b/paddle/fluid/ir_adaptor/translator/type_translator.h @@ -35,7 +35,7 @@ class TypeTranslator { using VarType = paddle::framework::proto::VarType; private: - TypeTranslator(); // Disallow instantiation outside of the class. + TEST_API TypeTranslator(); // Disallow instantiation outside of the class. std::unordered_map handlers; public: diff --git a/paddle/fluid/pir/dialect/op_generator/op_gen.py b/paddle/fluid/pir/dialect/op_generator/op_gen.py index e3fbba6ed7bf7b..7dd754e868f86d 100644 --- a/paddle/fluid/pir/dialect/op_generator/op_gen.py +++ b/paddle/fluid/pir/dialect/op_generator/op_gen.py @@ -41,7 +41,7 @@ # Note(Galaxy1458) The need_export_symbol_op_list is used # for some unittests these need to export symbol op compiled with dynamic lib. -need_export_symbol_op_list = ['AbsOp', 'FullOp'] +need_export_symbol_op_list = ['AbsOp', 'FullOp', 'UniformOp'] # ===================================== # String Template for h file code gen diff --git a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h index fd4004730c9064..4ff03f336dae24 100644 --- a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h +++ b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h @@ -23,13 +23,13 @@ class OpYamlInfoParser { public: OpYamlInfoParser() = delete; - explicit OpYamlInfoParser(const OpInfoTuple& op_info_tuple, - bool is_legacy_op = false); + TEST_API explicit OpYamlInfoParser(const OpInfoTuple& op_info_tuple, + bool is_legacy_op = false); - bool IsTensorAttribute(size_t index) const; - size_t InputTensorNumber() const; + TEST_API bool IsTensorAttribute(size_t index) const; + TEST_API size_t InputTensorNumber() const; - const std::string& AttrTypeName(const std::string& name) const; + TEST_API const std::string& AttrTypeName(const std::string& name) const; const std::string& TensorAttrTypeName(const std::string& name) const; const std::vector& TensorParams(bool is_kernel = false) const; diff --git a/test/cpp/pir/core/CMakeLists.txt b/test/cpp/pir/core/CMakeLists.txt index eab172b2054a0c..f2d0d6d4620047 100644 --- a/test/cpp/pir/core/CMakeLists.txt +++ b/test/cpp/pir/core/CMakeLists.txt @@ -43,26 +43,10 @@ cc_test( SRCS ir_parser_test.cc DEPS gtest op_dialect_vjp pir) -cc_test_old(ir_op_info_test SRCS op_info_test.cc DEPS gtest pir) -cc_test_old( - ir_op_yaml_info_parser_test - SRCS - op_yaml_info_parser_test.cc - DEPS - gtest - op_dialect - op_dialect_vjp - pir) +paddle_test(ir_op_info_test SRCS op_info_test.cc) +paddle_test(ir_op_yaml_info_parser_test SRCS op_yaml_info_parser_test.cc) -cc_test_old( - ir_type_converter_test - SRCS - ir_type_converter_test.cc - DEPS - gtest - program_translator - op_dialect_vjp - pir) +paddle_test(ir_type_converter_test SRCS ir_type_converter_test.cc) paddle_test(type_interface_test SRCS type_interface_test.cc DEPS test_dialect gtest)