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 OP&Test] support bf16 for batch norm #52407

Merged
merged 12 commits into from
Apr 12, 2023

Conversation

GuoxiaWang
Copy link
Contributor

@GuoxiaWang GuoxiaWang commented Mar 31, 2023

PR types

Function optimization

PR changes

APIs

Describe

support bf16 for batch norm

@paddle-bot
Copy link

paddle-bot bot commented Mar 31, 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.

@GuoxiaWang GuoxiaWang changed the title [AMP OP&Test] support bf16 for batchnorm [AMP OP&Test] support bf16 for batch norm Apr 4, 2023
places = []
if core.is_compiled_with_cuda():
place = core.CUDAPlace(0)
if core.is_float16_supported(place):
Copy link
Contributor

Choose a reason for hiding this comment

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

这里应该是is_bfloat16_supported

@@ -376,6 +397,28 @@ def test_check_output(self):
self.check_with_place(place, data_format, self.dtype, [2, 3])


class TestBF16BatchNormOpInference(TestBatchNormOpInference):
Copy link
Contributor

Choose a reason for hiding this comment

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

是否需要加个skipif跳过不支持bf16的平台

Copy link
Contributor

@ZzSean ZzSean left a comment

Choose a reason for hiding this comment

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

LGTM

@ZzSean ZzSean merged commit 523f8a2 into PaddlePaddle:develop Apr 12, 2023
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.

3 participants