From a9bee08d5e2ee43cbe52bd9adec97d1f1b08f811 Mon Sep 17 00:00:00 2001 From: YuanRisheng Date: Fri, 8 Sep 2023 16:48:49 +0800 Subject: [PATCH] [NewIR]Delete ops list (#57065) * delete list * fix ci bugs --- paddle/fluid/ir/dialect/op_generator/ops_api_gen.py | 4 ++-- python/paddle/_C_ops.py | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/ir/dialect/op_generator/ops_api_gen.py b/paddle/fluid/ir/dialect/op_generator/ops_api_gen.py index 529dd1ea3f6..bde5c7c23a7 100644 --- a/paddle/fluid/ir/dialect/op_generator/ops_api_gen.py +++ b/paddle/fluid/ir/dialect/op_generator/ops_api_gen.py @@ -95,8 +95,8 @@ class OpsAPIGen(CodeGen): def _gen_one_function_impl(self, name): if ( - name.endswith('grad') - or name.endswith('grad_') + name.endswith('_grad') + or name.endswith('_grad_') or name.endswith('xpu') or name in SPECIAL_STATIC_ONLY_APIS ): diff --git a/python/paddle/_C_ops.py b/python/paddle/_C_ops.py index 9c0104b382c..3dd87313fd5 100644 --- a/python/paddle/_C_ops.py +++ b/python/paddle/_C_ops.py @@ -16,14 +16,11 @@ from paddle.base import core __all__ = [] -UNIFIED_APIS = ['mean', 'concat', 'add_n', 'scale'] - for name in dir(core.eager.ops): globals()[name] = getattr(core.eager.ops, name) __all__.append(name) for name in dir(core.ir.ops): - if name in UNIFIED_APIS: - globals()[name] = getattr(core.ir.ops, name) - if name not in __all__: - __all__.append(name) + globals()[name] = getattr(core.ir.ops, name) + if name not in __all__: + __all__.append(name) -- GitLab