From 9b88eef1a1b6ecb5a3c305d57b98e6c0d87bb318 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Tue, 11 Apr 2023 13:31:29 +0800 Subject: [PATCH] [Polish CustomOP] Polish python codes, delete useless variable (#52728) --- python/paddle/utils/cpp_extension/extension_utils.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python/paddle/utils/cpp_extension/extension_utils.py b/python/paddle/utils/cpp_extension/extension_utils.py index e78cc85f73c..8ff70ca4c0e 100644 --- a/python/paddle/utils/cpp_extension/extension_utils.py +++ b/python/paddle/utils/cpp_extension/extension_utils.py @@ -1041,7 +1041,6 @@ def _gen_output_content( ): # ' ' * tab space * tab number indent = ' ' * 4 * 2 - inplace_idx = {v: k for k, v in inplace_reverse_idx.items()} dynamic_content = f""" {indent}res = [] {indent}start_idx = 0""" @@ -1134,7 +1133,6 @@ def _custom_api_content(op_name): attrs_map, inplace_reverse_idx, ) - lower_in_list = [p.split("@")[0].lower() for p in in_names] API_TEMPLATE = textwrap.dedent( """ import paddle.fluid.core as core @@ -1161,11 +1159,6 @@ def _custom_api_content(op_name): api_content = API_TEMPLATE.format( op_name=op_name, params_list=params_list, - ins_map=ins_map, - attrs_map=attrs_map, - # "[x, y, z]"" - in_names="[" + ",".join(lower_in_list) + "]", - attr_names="[" + ",".join(attr_names) + "]", outs_list=outs_list, dynamic_content=dynamic_content, static_content=static_content, -- GitLab