about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSomeone Serge <sergei.kozlukov@aalto.fi>2024-04-13 14:24:39 +0000
committerSomeone Serge <sergei.kozlukov@aalto.fi>2024-04-13 14:24:39 +0000
commit2c51064b0bb9e8ef60d4dab9bf7d26678114c24b (patch)
treec8e4282507d4ac574346df7108e0140b28d215ae
parent8262bdf73850f5ca7f2045a6d82568bb342603a4 (diff)
treewide: remove cudatoolkit.cc references
-rw-r--r--pkgs/applications/science/math/caffe/default.nix4
-rw-r--r--pkgs/applications/science/math/mxnet/default.nix4
-rw-r--r--pkgs/development/libraries/lightgbm/default.nix2
-rw-r--r--pkgs/development/libraries/opencv/3.x.nix4
-rw-r--r--pkgs/development/libraries/xgboost/default.nix4
5 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix
index 25f7229a845ae..2a84d4b27b141 100644
--- a/pkgs/applications/science/math/caffe/default.nix
+++ b/pkgs/applications/science/math/caffe/default.nix
@@ -22,7 +22,7 @@
 }:
 
 let
-  inherit (cudaPackages) cudatoolkit nccl;
+  inherit (cudaPackages) backendStdenv cudatoolkit nccl;
   # The default for cudatoolkit 10.1 is CUDNN 8.0.5, the last version to support CUDA 10.1.
   # However, this caffe does not build with CUDNN 8.x, so we use CUDNN 7.6.5 instead.
   # Earlier versions of cudatoolkit use pre-8.x CUDNN, so we use the default.
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
       "-DBLAS=open"
     ] ++ (if cudaSupport then [
            "-DCUDA_ARCH_NAME=All"
-           "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
+           "-DCUDA_HOST_COMPILER=${backendStdenv.cc}/bin/cc"
          ] else [ "-DCPU_ONLY=ON" ])
       ++ ["-DUSE_NCCL=${toggle ncclSupport}"]
       ++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
diff --git a/pkgs/applications/science/math/mxnet/default.nix b/pkgs/applications/science/math/mxnet/default.nix
index 993da2b898981..839537438962b 100644
--- a/pkgs/applications/science/math/mxnet/default.nix
+++ b/pkgs/applications/science/math/mxnet/default.nix
@@ -5,7 +5,7 @@
 }:
 
 let
-  inherit (cudaPackages) cudatoolkit cudaFlags cudnn;
+  inherit (cudaPackages) backendStdenv cudatoolkit cudaFlags cudnn;
 in
 
 assert cudnnSupport -> cudaSupport;
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
     ++ (if cudaSupport then [
       "-DUSE_OLDCMAKECUDA=ON"  # see https://github.com/apache/incubator-mxnet/issues/10743
       "-DCUDA_ARCH_NAME=All"
-      "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
+      "-DCUDA_HOST_COMPILER=${backendStdenv.cc}/bin/cc"
       "-DMXNET_CUDA_ARCH=${builtins.concatStringsSep ";" cudaFlags.realArches}"
     ] else [ "-DUSE_CUDA=OFF" ])
     ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
diff --git a/pkgs/development/libraries/lightgbm/default.nix b/pkgs/development/libraries/lightgbm/default.nix
index 5f8e6ceaecd02..57d3407aef91f 100644
--- a/pkgs/development/libraries/lightgbm/default.nix
+++ b/pkgs/development/libraries/lightgbm/default.nix
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
   '';
 
   cmakeFlags = lib.optionals doCheck [ "-DBUILD_CPP_TEST=ON" ]
-    ++ lib.optionals cudaSupport [ "-DUSE_CUDA=1" "-DCMAKE_CXX_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/cc" ]
+    ++ lib.optionals cudaSupport [ "-DUSE_CUDA=1" "-DCMAKE_CXX_COMPILER=${cudaPackages.backendStdenv.cc}/bin/cc" ]
     ++ lib.optionals openclSupport [ "-DUSE_GPU=ON" ]
     ++ lib.optionals mpiSupport [ "-DUSE_MPI=ON" ]
     ++ lib.optionals hdfsSupport [
diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix
index 377ebb3acdb5f..5e9409368cc70 100644
--- a/pkgs/development/libraries/opencv/3.x.nix
+++ b/pkgs/development/libraries/opencv/3.x.nix
@@ -39,7 +39,7 @@ assert blas.implementation == "openblas" && lapack.implementation == "openblas";
 assert enablePython -> pythonPackages != null;
 
 let
-  inherit (cudaPackages) cudatoolkit;
+  inherit (cudaPackages) backendStdenv cudatoolkit;
   inherit (cudaPackages.cudaFlags) cudaCapabilities;
 
   version = "3.4.18";
@@ -241,7 +241,7 @@ stdenv.mkDerivation {
     (opencvFlag "TBB" enableTbb)
   ] ++ lib.optionals enableCuda [
     "-DCUDA_FAST_MATH=ON"
-    "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
+    "-DCUDA_HOST_COMPILER=${backendStdenv.cc}/bin/cc"
     "-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
     "-DCUDA_ARCH_BIN=${lib.concatStringsSep ";" cudaCapabilities}"
     "-DCUDA_ARCH_PTX=${lib.last cudaCapabilities}"
diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix
index a1ae57f8824f3..0018a73341e31 100644
--- a/pkgs/development/libraries/xgboost/default.nix
+++ b/pkgs/development/libraries/xgboost/default.nix
@@ -75,8 +75,8 @@ stdenv.mkDerivation rec {
     "-DUSE_CUDA=ON"
     # Their CMakeLists.txt does not respect CUDA_HOST_COMPILER, instead using the CXX compiler.
     # https://github.com/dmlc/xgboost/blob/ccf43d4ba0a94e2f0a3cc5a526197539ae46f410/CMakeLists.txt#L145
-    "-DCMAKE_C_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/gcc"
-    "-DCMAKE_CXX_COMPILER=${cudaPackages.cudatoolkit.cc}/bin/g++"
+    "-DCMAKE_C_COMPILER=${cudaPackages.backendStdenv.cc}/bin/gcc"
+    "-DCMAKE_CXX_COMPILER=${cudaPackages.backendStdenv.cc}/bin/g++"
   ] ++ lib.optionals
     (cudaSupport
       && lib.versionAtLeast cudaPackages.cudatoolkit.version "11.4.0")