-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
self.place, | ||
['Y'], | ||
'Out', | ||
max_relative_error=0.5, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改为默认值
@@ -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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前向测试中的atol还未修改,需要补充修改
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BF16测例数量与FP16对齐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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无需调整
There was a problem hiding this comment.
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失败
@ZzSean 修改CI已完成 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Others
Description
matmul_with_flatten 算子FP16/BF16单测完善
已有FP16单测和BF16部分支持