Wrongly returns nan for vectorized complex numbers division on PPC/ZArch #109870
Labels
module: POWER
Issues specific to the POWER/ppc architecture
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Describe the bug
Copied from #92043 which still applies for vectorized PPC and likely to ZArch while it was fixed for x86 by #93277
Pytorch wrongly returns nan for complex numbers division where the results are still within the range of the datatype.
For example: (0.0 + 0.0j) / (1e-36 + 0.0j) in complex64. In this case, both operands and the results (which is 0) are within the defined range of complex64. However, it returns (nan + nanj).
Here's the reproducing code:
Or just run
test_complex_div_underflow_overflow
.The reason is that
abs_2_
already overflows in the tested range (e.g.finfo.min / 2
intest_complex_div_underflow_overflow
) and theelwise_mult(vr)
does too.Versions
PyTorch 2.1.0
The text was updated successfully, but these errors were encountered: