From 5a3965e10dc42ae02e250b27db0e69d03e5771a2 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Mon, 11 Dec 2023 17:03:04 +0000 Subject: [PATCH] python3Packages.torch: gate NCCL with cudaSupport --- pkgs/development/python-modules/torch/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/torch/default.nix b/pkgs/development/python-modules/torch/default.nix index 19bf8a8a1d40..3228bee1434c 100644 --- a/pkgs/development/python-modules/torch/default.nix +++ b/pkgs/development/python-modules/torch/default.nix @@ -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;