-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【complex op No.8】add complex support for Rsqrt #63720
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
你的PR提交成功,感谢你对开源项目的贡献! |
Sorry to inform you that a468601's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
Sorry to inform you that 1fd3797's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
'float32', | ||
'float64', | ||
'complex64', | ||
'complex128', |
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.
docstring也添加上复数的两个类型
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.
Done.
@@ -1910,6 +1915,37 @@ def if_enable_cinn(self): | |||
self.enable_cinn = False | |||
|
|||
|
|||
class TestRsqrt_Complex64(TestRsqrt): |
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.
没有complex128类型的test
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.
Done.
np.testing.assert_allclose(ddx.numpy(), expected_ddx, rtol=1e-3) | ||
|
||
|
||
class TestRsqrt_Complex128(TestRsqrt): |
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.
是不是应该继承 TestRsqrt_Complex64
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.
Done.
) | ||
|
||
def test_grad_grad(self): | ||
paddle.disable_static() |
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.
建议使用这种方式控制动态图下运行:
Paddle/test/legacy_test/test_activation_op.py
Line 335 in 2565b9a
with dynamic_guard(): |
def init_dtype(self): | ||
self.dtype = np.complex64 | ||
|
||
def test_check_grad(self): |
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.
GPU单测没运行,加下在GPU下运行的单测
['X'], | ||
'Out', | ||
check_pir=True, | ||
max_relative_error=0.007, |
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.
测试的时候误差是0.006多,这里设成了0.007
Sorry to inform you that c957264's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
Sorry to inform you that 1beb392's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
Since you haven't replied for more than a year, we have closed this issue/pr. |
PR Category
Others
PR Types
New features
Description
add complex support for Rsqrt