python3Packages.torch: gate NCCL with cudaSupport

This commit is contained in:
Connor Baker 2023-12-11 17:03:04 +00:00
parent 04efefaa4c
commit 5a3965e10d

View file

@ -273,7 +273,7 @@ in buildPythonPackage rec {
PYTORCH_BUILD_VERSION = version;
PYTORCH_BUILD_NUMBER = 0;
USE_NCCL = setBool (cudaPackages ? nccl);
USE_NCCL = setBool (cudaSupport && cudaPackages ? nccl);
USE_SYSTEM_NCCL = setBool useSystemNccl; # don't build pytorch's third_party NCCL
USE_STATIC_NCCL = setBool useSystemNccl;