未验证 提交 9b88eef1 编写于 作者: H HongyuJia 提交者: GitHub

[Polish CustomOP] Polish python codes, delete useless variable (#52728)

上级 f352c23e
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册