This line I believe is wrong and should be #if !defined(GLOO_USE_CUDA) instead.
The problem manifests when compiling PyTorch with HIP backend. Compiler spits out that GLOO_USE_ROCM isn't defined when obviously it is, because it is defined to 1 and ! negates that 1 with a 0 which leads to a false evaluation.
gloo/gloo/cuda.h
Line 23 in 70dc360
This line I believe is wrong and should be
#if !defined(GLOO_USE_CUDA)instead.The problem manifests when compiling PyTorch with HIP backend. Compiler spits out that GLOO_USE_ROCM isn't defined when obviously it is, because it is defined to 1 and ! negates that 1 with a 0 which leads to a false evaluation.