From 8a5bbd0b9da36322a17ca8233cfe17b6b99c1f36 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 9 Aug 2025 20:39:18 +0100 Subject: [PATCH] =?UTF-8?q?treewide:=20remove=20already=E2=80=90obsolete?= =?UTF-8?q?=20CUDA=20version=20conditions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/ca/catboost/package.nix | 4 ---- pkgs/by-name/ma/magma/package.nix | 6 ------ pkgs/by-name/ti/tiny-cuda-nn/package.nix | 2 +- pkgs/by-name/xg/xgboost/package.nix | 1 - .../cuda-modules/_cuda/fixups/nsight_systems.nix | 2 +- pkgs/development/cuda-modules/cutensor/extension.nix | 8 +------- pkgs/development/libraries/ctranslate2/default.nix | 2 +- pkgs/development/python-modules/torch/source/default.nix | 5 +---- 8 files changed, 5 insertions(+), 25 deletions(-) diff --git a/pkgs/by-name/ca/catboost/package.nix b/pkgs/by-name/ca/catboost/package.nix index dae453510a5c..76fc6f64def7 100644 --- a/pkgs/by-name/ca/catboost/package.nix +++ b/pkgs/by-name/ca/catboost/package.nix @@ -44,10 +44,6 @@ stdenv.mkDerivation (finalAttrs: { shopt -s globstar for cmakelists in **/CMakeLists.*; do sed -i "s/OpenSSL::OpenSSL/OpenSSL::SSL/g" $cmakelists - ${lib.optionalString (cudaPackages.cudaOlder "11.8") '' - sed -i 's/-gencode=arch=compute_89,code=sm_89//g' $cmakelists - sed -i 's/-gencode=arch=compute_90,code=sm_90//g' $cmakelists - ''} done ''; diff --git a/pkgs/by-name/ma/magma/package.nix b/pkgs/by-name/ma/magma/package.nix index 2e6a94e91990..9c5d762fd8eb 100644 --- a/pkgs/by-name/ma/magma/package.nix +++ b/pkgs/by-name/ma/magma/package.nix @@ -2,7 +2,6 @@ autoPatchelfHook, blas, cmake, - cudaPackages_11 ? null, cudaPackages, cudaSupport ? config.cudaSupport, fetchurl, @@ -158,11 +157,6 @@ stdenv.mkDerivation (finalAttrs: { cuda_cudart # cuda_runtime.h libcublas # cublas_v2.h libcusparse # cusparse.h - ] - ++ lists.optionals (cudaOlder "11.8") [ - cuda_nvprof # - ] - ++ lists.optionals (cudaAtLeast "11.8") [ cuda_profiler_api # ] ) diff --git a/pkgs/by-name/ti/tiny-cuda-nn/package.nix b/pkgs/by-name/ti/tiny-cuda-nn/package.nix index d5cf4d2d7285..ebeea75fa20b 100644 --- a/pkgs/by-name/ti/tiny-cuda-nn/package.nix +++ b/pkgs/by-name/ti/tiny-cuda-nn/package.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation (finalAttrs: { # Remove this once a release is made with # https://github.com/NVlabs/tiny-cuda-nn/commit/78a14fe8c292a69f54e6d0d47a09f52b777127e1 - postPatch = lib.optionals (cudaAtLeast "11.0") '' + postPatch = '' substituteInPlace bindings/torch/setup.py --replace-fail \ "-std=c++14" "-std=c++17" ''; diff --git a/pkgs/by-name/xg/xgboost/package.nix b/pkgs/by-name/xg/xgboost/package.nix index d853131809e2..ecacbabdd837 100644 --- a/pkgs/by-name/xg/xgboost/package.nix +++ b/pkgs/by-name/xg/xgboost/package.nix @@ -194,7 +194,6 @@ effectiveStdenv.mkDerivation rec { meta = with lib; { description = "Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library"; homepage = "https://github.com/dmlc/xgboost"; - broken = cudaSupport && cudaPackages.cudaOlder "11.4"; license = licenses.asl20; mainProgram = "xgboost"; platforms = platforms.unix; diff --git a/pkgs/development/cuda-modules/_cuda/fixups/nsight_systems.nix b/pkgs/development/cuda-modules/_cuda/fixups/nsight_systems.nix index a6e346eb27c2..9983f880b58b 100644 --- a/pkgs/development/cuda-modules/_cuda/fixups/nsight_systems.nix +++ b/pkgs/development/cuda-modules/_cuda/fixups/nsight_systems.nix @@ -114,7 +114,7 @@ in xorg.libXtst ] # NOTE(@connorbaker): Seems to be required only for aarch64-linux. - ++ lib.optionals (stdenv.hostPlatform.isAarch64 && cudaAtLeast "11.8") [ + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ gst_all_1.gst-plugins-bad ]; diff --git a/pkgs/development/cuda-modules/cutensor/extension.nix b/pkgs/development/cuda-modules/cutensor/extension.nix index 57de518aa7ac..ef26bf7e43f2 100644 --- a/pkgs/development/cuda-modules/cutensor/extension.nix +++ b/pkgs/development/cuda-modules/cutensor/extension.nix @@ -74,17 +74,11 @@ let # The subdirectories in lib/ tell us which versions of CUDA are supported. # Typically the names will look like this: # - # - 10.2 # - 11 - # - 11.0 # - 12 # libPath :: String - libPath = - let - cudaMajorVersion = versions.major cudaMajorMinorVersion; - in - if cudaMajorMinorVersion == "10.2" then cudaMajorMinorVersion else cudaMajorVersion; + libPath = versions.major cudaMajorMinorVersion; # A release is supported if it has a libPath that matches our CUDA version for our platform. # LibPath are not constant across the same release -- one platform may support fewer diff --git a/pkgs/development/libraries/ctranslate2/default.nix b/pkgs/development/libraries/ctranslate2/default.nix index 550fb0bc164d..8524bb3e16ce 100644 --- a/pkgs/development/libraries/ctranslate2/default.nix +++ b/pkgs/development/libraries/ctranslate2/default.nix @@ -99,6 +99,6 @@ stdenv'.mkDerivation rec { hexa misuzu ]; - broken = (cudaPackages.cudaOlder "11.4") || !(withCuDNN -> withCUDA); + broken = !(withCuDNN -> withCUDA); }; } diff --git a/pkgs/development/python-modules/torch/source/default.nix b/pkgs/development/python-modules/torch/source/default.nix index 18ede02d80d9..014c01adca4d 100644 --- a/pkgs/development/python-modules/torch/source/default.nix +++ b/pkgs/development/python-modules/torch/source/default.nix @@ -552,10 +552,7 @@ buildPythonPackage rec { # Some platforms do not support NCCL (i.e., Jetson) nccl # Provides nccl.h AND a static copy of NCCL! ] - ++ lists.optionals (cudaOlder "11.8") [ - cuda_nvprof # - ] - ++ lists.optionals (cudaAtLeast "11.8") [ + ++ [ cuda_profiler_api # ] )