csarofeen / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration
http://pytorch.org
Other
26 stars 7 forks source link

Compilation failure with real()/imag() on complex64 #2564

Closed jacobhinkle closed 1 year ago

jacobhinkle commented 1 year ago

🐛 Describe the bug

When given complex64 input, the real() and imag() ops try to call std::realf() and std::imagf() which do not exist, leading to a compile error. The fix is to add these ops to the needFloatSuffix switch statement.

Versions

TOT