[Dist][ez][nit] Formatted nccl version string in startup (#111076)
Formats the string using the existing getNCCLversion
Differential Revision: [D50193558](https://our.internmc.facebook.com/intern/diff/D50193558/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/111076
Approved by: https://github.com/Skylion007
diff --git a/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp b/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp
index ca8dd08..6dfdd0a 100644
--- a/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp
+++ b/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp
@@ -690,13 +690,8 @@
parseEnvVarString("TORCH_DISTRIBUTED_DEBUG", OFF.c_str());
const char* nccl_debug = parseEnvVarString("NCCL_DEBUG", OFF.c_str());
LOG(INFO) << "[Rank " << rank_
- << "] ProcessGroupNCCL initialization options:"
-#ifdef NCCL_VERSION_CODE
- // NCCL > 2.3.5 should have NCCL_VERSION_CODE defined
- << "NCCL VERSION: " << NCCL_VERSION_CODE
-#else
- << "NCCL VERSION: " << NCCL_MAJOR << NCCL_MINOR << NCCL_PATCH
-#endif
+ << "] ProcessGroupNCCL initialization options: "
+ << "NCCL version: " << getNcclVersion()
<< ", NCCL_ASYNC_ERROR_HANDLING: " << asyncErrorHandling_
<< ", NCCL_DESYNC_DEBUG: " << desyncDebug_
<< ", NCCL_ENABLE_TIMING: " << enableTiming_.load()