未验证 提交 d78cbee7 编写于 作者: R Ruibin Cheung 提交者: GitHub

【complex op】No.18 add complex support for silu (#57058)

上级 3ce7eb0f
......@@ -496,16 +496,6 @@ HOSTDEVICE inline complex<T> log(const complex<T>& a) {
#endif
}
template <typename T>
HOSTDEVICE inline complex<T> exp(const complex<T>& a) {
#if defined(PADDLE_WITH_CUDA_OR_HIP_COMPLEX) && \
(defined(__CUDA_ARCH__) || defined(__HIPCC__))
return complex<T>(thrust::exp(thrust::complex<T>(a)));
#else
return complex<T>(std::exp(std::complex<T>(a)));
#endif
}
template <typename T>
inline std::ostream& operator<<(std::ostream& os, const complex<T>& a) {
os << "real:" << a.real << " imag:" << a.imag;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册