-
Notifications
You must be signed in to change notification settings - Fork 5.9k
【UnitTestFix No.8】fix test_mean_op.py #75457
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
Conversation
…alNanInput, RealValuedNanInput, ZeroSize
|
你的PR提交成功,感谢你对开源项目的贡献! |
| self.outputs = {'Out': out_np} | ||
|
|
||
|
|
||
| class TestMeanOp_Int32ZeroSize(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.
可以解释一下这几个case为什么要删除吗?
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.
我印象里面是说int类型grad不支持,我后续继续完善
test/legacy_test/test_mean_op.py
Outdated
|
|
||
| def test_checkout_grad(self): | ||
| self.check_grad(['X'], 'Out', check_pir=True, check_prim_pir=True) | ||
| place = core.CUDAPlace(0) |
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.
尽量使用op_test中的get_device_place来获取place,这样单测可以在不会影响GPU的正确性的情况下支持更多硬件。
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_float16_supported(get_device_place()), | ||
| "core is not compiled with CUDA", | ||
| ) | ||
| class TestReduceMeanOp(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.
不要删除ReduceMean相关单测
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.
好的导师,后续我会继续完善修改好
|
研发导师您好
|
是研发导师😄 |
|
研发导师您好,我称呼搞错了,不好意思 |
明白。那可以删除int zero-size的case。kernel中的数据类型就不要做修改了。 |
好的导师,等CI过了之后,我就把数据类型的添加做一个删除 |
|
研发导师您好,上述2个CI错误都与 |
|
是的,删除掉类型之后,重新commit触发一下CI吧,有可能是某些随机的原因导致CI失败,应该与你的修改无关。后续如果还失败,可以尝试comment:/re-run all-failed,来触发失败的CI流水线。如果仍然失败,那么需要看一下是哪里的修改导致的。 |
谢谢导师,我已重新commit |
YqGe585
left a comment
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 Category
Execute Infrastructure
PR Types
Bug fixes
Description
mean_allmean_wrapper和reduce的类complex64和complex128为type,因为输入存在nan,造成grad报错的问题float64为type,因为输入存在nan,造成grad报错的问题