Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support auto generation V2 abs #53341

Merged
merged 9 commits into from
May 16, 2023

Conversation

enkilee
Copy link
Contributor

@enkilee enkilee commented Apr 25, 2023

PR types

Others

PR changes

Others

Description

support auto generation V2 abs

@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Apr 25, 2023
@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

paddle/phi/api/yaml/ops.yaml Outdated Show resolved Hide resolved
paddle/phi/api/yaml/backward.yaml Show resolved Hide resolved
paddle/phi/api/yaml/backward.yaml Show resolved Hide resolved
paddle/phi/api/yaml/backward.yaml Show resolved Hide resolved
paddle/phi/api/yaml/ops.yaml Show resolved Hide resolved
Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要修改一下API描述:

  1. python/paddle/fluid/layers/layer_function_generator.py,约307:
    原始代码:
    func.__name__ = op_type
    func.__doc__ = _generate_doc_string_(
        op_proto,
        additional_args_lines=[
            "name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`."
        ],
    )
    return func

修改为:

    func.__name__ = op_type
    if (op_type == "abs"):
        func.__doc__ = f"""
    Abs Operator.

    Perform elementwise abs for input `X`.
    .. math::

        out = |x|

    Args :
        x (Tensor): The input tensor of abs op.
        out (Tensor), The output tensor of abs op.
"""
    else:
        func.__doc__ = _generate_doc_string_(
            op_proto,
            additional_args_lines=[
                "name (str, optional): Name for the operation (optional, default is None). For more information, please refer to :ref:`api_guide_Name`."
            ],
        )
    return func

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented May 7, 2023

Sorry to inform you that 28084ca's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@heavyrain-lzy
Copy link
Contributor

请重新触发一下CI

@enkilee
Copy link
Contributor Author

enkilee commented May 8, 2023

收到

@heavyrain-lzy
Copy link
Contributor

rerun一下CINN的ci,感觉是随机挂

Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heavyrain-lzy
Copy link
Contributor

麻烦review一下abs的API说明文档@sunzhongkai588, @Ligoml

@luotao1 luotao1 merged commit b86bbe8 into PaddlePaddle:develop May 16, 2023
@enkilee enkilee deleted the support-auto-generation-V2-abs branch July 6, 2023 01:28
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants