diff --git a/torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp b/torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp index 4081529d486d3..04c936cb02c31 100644 --- a/torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp +++ b/torch/csrc/distributed/c10d/ProcessGroupXCCL.cpp @@ -102,7 +102,7 @@ void check_xpu_single_tensor( int64_t check_xpu_tensors_same_device(const std::vector& tensors) { TORCH_CHECK_WITH( - ValueError, tensors.size() == 0, "Tensor list must be nonempty"); + ValueError, tensors.size() != 0, "Tensor list must be nonempty"); const auto& first = tensors.front();