Skip to content

Conversation

Aoraki-Dream
Copy link
Contributor

PR Category

Operator Mechanism

PR Types

New features

Description

add complex support for sqrt

Copy link

paddle-bot bot commented Sep 11, 2024

你的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 the contributor External developers label Sep 11, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 12, 2024
@CLAassistant
Copy link

CLAassistant commented Sep 23, 2024

CLA assistant check
All committers have signed the CLA.

@Aoraki-Dream
Copy link
Contributor Author

截屏2024-09-26 21 46 50 单测运行打印结果截图

struct SqrtFunctor<ComplexType<T>> : public BaseActivationFunctor<T> {
template <typename Device, typename X, typename Out>
void operator()(Device d, X x, Out out) const {
out.device(d) = x.sqrt();
Copy link
Contributor

Choose a reason for hiding this comment

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

这个跟上面的不带complex的运算逻辑一样,是否还需要单独特化一个struct

@@ -759,6 +767,23 @@ struct SqrtGradFunctor : public BaseActivationFunctor<T> {
}
};

template <typename T>
struct SqrtGradFunctor<ComplexType<T>> : public BaseActivationFunctor<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

改为BaseActivationFunctor<ComplexType>会不会好些

self.dtype = np.complex64

def test_check_output(self):
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

这个函数不需要运行么

Copy link

paddle-ci-bot bot commented Oct 4, 2024

Sorry to inform you that 501e467's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@luotao1 luotao1 closed this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants