8000 [rfc][be] static assert that nccl version is >= 2.4 (#142023) · pytorch/pytorch@a9e3281 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9e3281

Browse files
c-p-i-opytorchmergebot
authored andcommitted
[rfc][be] static assert that nccl v 8000 ersion is >= 2.4 (#142023)
Summary: Static assert that NCCL VERSION is greater than 2.4. This is in preparation of enabling error checking by default in PyTorch library and removal of some macros. This is in PR #141914. The rationale behind this version is: 1. 2.4 released ~2 years ago so it's unlikely that someone is still using the old library. 2. Enabling error checking is benefitial to the community as it helps debug subtle bugs in production environments. Test Plan: unit tests Differential Revision: D66737055 Pull Request resolved: #142023 Approved by: https://github.com/kwen2501
1 parent 5513e2e commit a9e3281

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

torch/csrc/distributed/c10d/NCCLUtils.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ constexpr int64_t kCommInitBusyWaitMillis = 2;
3939
#define NCCL_REMOTE_ERROR
< 67AA /code>
4040
#endif
4141

42+
static_assert(
43+
(NCCL_MAJOR == 2 && NCCL_MINOR >= 7) || (NCCL_MAJOR > 2),
44+
"NCCL version must be 2.7 or later");
45+
4246
// Error checking is enabled only for NCCL versions 2.4+ since ncclCommAbort()
4347
// and ncclCommGetAsyncError() are not supported in earlier versions.
4448
#if defined(NCCL_MAJOR) && (NCCL_MAJOR == 2) && defined(NCCL_MINOR) && \

0 commit comments

Comments
 (0)
0