Our existing definition of std::isnan(c10::complex<T>) now clashes with torch's (since v2.0.1). Since theirs doesn't have __device__, it can't be compiled on the GPU, and we can't (?) overwrite it.
A solution on our side is to... move all our functions to our namespace instead of std... or something less drastic.
It may be easier to just add C10_HOST_DEVICE to the isnan definition in c10/util/complex_utils.h, which is a quick hack solution for phytorch users who have write access to the torch headers.
(related to pytorch/pytorch#107864)
Our existing definition of
std::isnan(c10::complex<T>)
now clashes with torch's (since v2.0.1). Since theirs doesn't have__device__
, it can't be compiled on the GPU, and we can't (?) overwrite it.A solution on our side is to... move all our functions to our namespace instead of
std
... or something less drastic.It may be easier to just add
C10_HOST_DEVICE
to theisnan
definition inc10/util/complex_utils.h
, which is a quick hack solution forphytorch
users who have write access to the torch headers.