diff options
author | Jason Miller <54179289+jmillerpdt@users.noreply.github.com> | 2022-12-17 01:00:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-16 22:00:36 -0800 |
commit | 8392158289e7d1a801905bc4195983f1b7434770 (patch) | |
tree | 87a0588557dffb92f2980f5b6b233f0c70da1242 /pkgs/development/libraries/science/math/magma | |
parent | 08b5fc6d8c4fda44b5b98e36c294c5e031f3ef1c (diff) |
cudaPackages: add cudaFlags (#205351)
* cudaPackages: add cudaFlags * cudaNames -> cudaMicroarchitectureNames * update documentation, remove config for static library removal * doc link added to flags * fix whitespace in assignment
Diffstat (limited to 'pkgs/development/libraries/science/math/magma')
-rw-r--r-- | pkgs/development/libraries/science/math/magma/default.nix | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/pkgs/development/libraries/science/math/magma/default.nix b/pkgs/development/libraries/science/math/magma/default.nix index 05d7d4fa18424..06b4e12d04e7d 100644 --- a/pkgs/development/libraries/science/math/magma/default.nix +++ b/pkgs/development/libraries/science/math/magma/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, cmake, gfortran, ninja, cudaPackages, libpthreadstubs, lapack, blas }: let - inherit (cudaPackages) cudatoolkit; + inherit (cudaPackages) cudatoolkit cudaFlags; in assert let majorIs = lib.versions.major cudatoolkit.version; @@ -10,36 +10,6 @@ assert let majorIs = lib.versions.major cudatoolkit.version; let version = "2.6.2"; - # We define a specific set of CUDA compute capabilities here, - # because CUDA 11 does not support compute capability 3.0. Also, - # we use it to enable newer capabilities that are not enabled - # by magma by default. The list of supported architectures - # can be found in magma's top-level CMakeLists.txt. - cudaCapabilities = rec { - cuda9 = [ - "Kepler" # 3.0, 3.5 - "Maxwell" # 5.0 - "Pascal" # 6.0 - "Volta" # 7.0 - ]; - - cuda10 = [ - "Turing" # 7.5 - ] ++ cuda9; - - cuda11 = [ - "sm_35" # sm_30 is not supported by CUDA 11 - "Maxwell" # 5.0 - "Pascal" # 6.0 - "Volta" # 7.0 - "Turing" # 7.5 - "Ampere" # 8.0 - ]; - }; - - capabilityString = lib.strings.concatStringsSep "," - cudaCapabilities."cuda${lib.versions.major cudatoolkit.version}"; - in stdenv.mkDerivation { pname = "magma"; inherit version; @@ -53,7 +23,9 @@ in stdenv.mkDerivation { buildInputs = [ cudatoolkit libpthreadstubs lapack blas ]; - cmakeFlags = [ "-DGPU_TARGET=${capabilityString}" ]; + cmakeFlags = [ + "-DGPU_TARGET=${builtins.concatStringsSep "," cudaFlags.cudaRealArchs}" + ]; doCheck = false; |