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

【Hackathon No.64】matmul_with_flatten 算子FP16/BF16单测完善 #52953

Merged
merged 1 commit into from
May 4, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Apr 16, 2023

PR types

Others

PR changes

Others

Description

matmul_with_flatten 算子FP16/BF16单测完善
已有FP16单测和BF16部分支持

图片

@paddle-bot
Copy link

paddle-bot bot commented Apr 16, 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 16, 2023
@co63oc
Copy link
Contributor Author

co63oc commented Apr 16, 2023

@luotao1 @ZzSean CI已完成, PR-CI-Static-Check 是提示int8_t grad没有支持
图片

self.place,
['Y'],
'Out',
max_relative_error=0.5,
Copy link
Contributor

@ZzSean ZzSean Apr 18, 2023

Choose a reason for hiding this comment

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

这个单测中fp16和fp32的max_relative_error设置的都比较大,需要调整确认下默认值是否可以通过测试,同bf16

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改为默认值

@co63oc
Copy link
Contributor Author

co63oc commented Apr 19, 2023

PR-CI-Static-Check 是uint8支持
图片

@co63oc
Copy link
Contributor Author

co63oc commented Apr 25, 2023

@luotao1 @ZzSean CI已完成,PR-CI-Static-Check 是uint8支持

@@ -114,7 +114,7 @@ def test_check_grad_ignore_y(self):
@unittest.skipIf(
not core.is_compiled_with_cuda(), "core is not compiled with CUDA"
)
class TestFP16MulOp1(TestMulOp):
class TestMulFP16Op1(TestMulOp):
Copy link
Contributor

Choose a reason for hiding this comment

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

前向测试中的atol还未修改,需要补充修改

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

or not core.is_bfloat16_supported(core.CUDAPlace(0)),
"core is not compiled with CUDA or not support bfloat16",
)
class TestMulBF16Op(OpTest):
Copy link
Contributor

Choose a reason for hiding this comment

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

BF16测例数量与FP16对齐

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改,TestMulBF16Op2 check_grad需要设置max_relative_error=0.2
图片

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ZzSean 修改CI已完成

self.place,
['Y'],
'Out',
max_relative_error=0.2,
Copy link
Contributor

Choose a reason for hiding this comment

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

看结果差的有点多,建议调大numeric_grad_delta,可以试试0.05,max_relative_error无需调整

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改 numeric_grad_delta为0.02,测试0.01失败

@co63oc
Copy link
Contributor Author

co63oc commented Apr 28, 2023

@ZzSean 修改CI已完成

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants