-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【Complex op】add complex support for sin, cos, tan, tanh #55380
【Complex op】add complex support for sin, cos, tan, tanh #55380
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -566,6 +566,16 @@ def if_enable_cinn(self): | |||
pass | |||
|
|||
|
|||
class TestTanh_Complex64(TestTanh): | |||
def init_dytpe(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.
只是改变dtype,似乎input只有实部,没有虚部(虚部都为0)
@@ -554,7 +559,8 @@ def setUp(self): | |||
def test_check_grad(self): | |||
if self.dtype == np.float16: | |||
return | |||
self.check_grad(['X'], 'Out', check_prim=True) | |||
# TODO(ScottWong98): set `check_prim=False` when `fill_any_like` supports `complex` dtype |
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.
这里加个分支判断,只有complex类型的才设置check_prim=False,还有maxrelative等,不要影响正常的单测
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
@luotao1 麻烦涛姐帮我 review 一下 |
PR types
New features
PR changes
OPs
Description
add complex support for
sin
,cos
,tan
,tanh
.