diff options
author | Samuel Ainsworth <skainsworth@gmail.com> | 2023-03-20 17:35:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 17:35:30 -0400 |
commit | 862746a32f1921a5928062e4b3c4feb055c440be (patch) | |
tree | 44ac55ddad0577ad03f261b1274cb7b10a404ef1 | |
parent | f5582fba220b37e675fdf1b934420ea72e820e00 (diff) | |
parent | b1fec2a5747ecf7aebdd2cea812bc13ae963fef7 (diff) |
Merge pull request #221950 from ConnorBaker/fix/221898-torchvision-backendStdenv
python3Packages.torchvision: switch to backendStdenv.cc from cudatoolkit.cc
-rw-r--r-- | pkgs/development/python-modules/torchvision/default.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/torchvision/default.nix b/pkgs/development/python-modules/torchvision/default.nix index 9539b1bb0bfeb..449d635372a0b 100644 --- a/pkgs/development/python-modules/torchvision/default.nix +++ b/pkgs/development/python-modules/torchvision/default.nix @@ -15,7 +15,7 @@ let inherit (torch) cudaCapabilities cudaPackages cudaSupport; - inherit (cudaPackages) cudatoolkit cudaFlags cudaVersion; + inherit (cudaPackages) backendStdenv cudaVersion; # NOTE: torchvision doesn't use cudnn; torch does! # For this reason it is not included. @@ -65,8 +65,8 @@ buildPythonPackage { # NOTE: We essentially override the compilers provided by stdenv because we don't have a hook # for cudaPackages to swap in compilers supported by NVCC. + lib.optionalString cudaSupport '' - export CC=${cudatoolkit.cc}/bin/cc - export CXX=${cudatoolkit.cc}/bin/c++ + export CC=${backendStdenv.cc}/bin/cc + export CXX=${backendStdenv.cc}/bin/c++ export TORCH_CUDA_ARCH_LIST="${lib.concatStringsSep ";" cudaCapabilities}" export FORCE_CUDA=1 ''; |