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

[AMP] Add check_numerics API. #54301

Merged
merged 14 commits into from
Jun 8, 2023

Conversation

Xreki
Copy link
Contributor

@Xreki Xreki commented Jun 2, 2023

PR types

Others

PR changes

APIs

Description

Pcard-70458

新增paddle.amp.debugging.check_numerics接口,组网中可通过调用该接口,检查某个Tensor是否存在异常值、最大值最小值分别是多少。注意,该接口不受FLAGS_check_nan_inf开关控制。

def check_numerics(
    tensor, op_type, var_name, debug_mode=DebugMode.CHECK_NAN_INF_AND_ABORT
):

英文文档预览:
image

中文文档:PaddlePaddle/docs#5922

@paddle-bot
Copy link

paddle-bot bot commented Jun 2, 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.

@Xreki Xreki requested a review from zhangting2020 June 6, 2023 06:33
zhangting2020
zhangting2020 previously approved these changes Jun 6, 2023
lanxianghit
lanxianghit previously approved these changes Jun 6, 2023
@Xreki Xreki dismissed stale reviews from lanxianghit and zhangting2020 via eaad8c7 June 7, 2023 07:09
Shaveen49
Shaveen49 previously approved these changes Jun 7, 2023
Copy link
Contributor

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

LGTM for docs

var_name(str): The name of target tensor.
debug_mode(paddle.amp.debugging.DebugMode, optional): The mode of debugging to be used. Default is DebugMode.CHECK_NAN_INF_AND_ABORT.

Returns:
Copy link
Contributor

Choose a reason for hiding this comment

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

这里预览效果有问题,不方便的话可以在下个pr里修改
方法是把返回值后的:改为,即可

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@Xreki Xreki merged commit a544459 into PaddlePaddle:develop Jun 8, 2023
@Xreki Xreki deleted the op/add_check_numerics_api branch June 8, 2023 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants