Unverified Commit 050bbae7 authored by Someone's avatar Someone Committed by GitHub
Browse files

cudaPackages: introduce and use cudaLib (#406531)

(_cuda.lib)
parents 4fb8ed7d 688e14d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ All new projects should use the CUDA redistributables available in [`cudaPackage

### Updating supported compilers and GPUs {#updating-supported-compilers-and-gpus}

1. Update `nvcc-compatibilities.nix` in `pkgs/development/cuda-modules/` to include the newest release of NVCC, as well as any newly supported host compilers.
2. Update `gpus.nix` in `pkgs/development/cuda-modules/` to include any new GPUs supported by the new release of CUDA.
1. Update `nvccCompatibilities` in `pkgs/development/cuda-modules/_cuda/data/nvcc.nix` to include the newest release of NVCC, as well as any newly supported host compilers.
2. Update `cudaCapabilityToInfo` in `pkgs/development/cuda-modules/_cuda/data/cuda.nix` to include any new GPUs supported by the new release of CUDA.

### Updating the CUDA Toolkit runfile installer {#updating-the-cuda-toolkit}

+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ stdenv'.mkDerivation rec {
  cmakeFlags = lib.optionals cudaSupport [
    (lib.cmakeBool "CUDA_ENABLED" true)
    (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (
      lib.strings.concatStringsSep ";" (map cudaPackages.flags.dropDot cudaCapabilities)
      lib.strings.concatStringsSep ";" (map cudaPackages.flags.dropDots cudaCapabilities)
    ))
  ];

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@
    ]
    ++ lib.optionals cudaSupport [
      (lib.cmakeFeature "DLIB_USE_CUDA_COMPUTE_CAPABILITIES" (
        builtins.concatStringsSep "," (with cudaPackages.flags; map dropDot cudaCapabilities)
        builtins.concatStringsSep "," (with cudaPackages.flags; map dropDots cudaCapabilities)
      ))
    ];

+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ let
    cuda_nvcc
    libcublas
    ;
  inherit (cudaPackages.flags) cudaCapabilities dropDot isJetsonBuild;
  inherit (cudaPackages.flags) cudaCapabilities dropDots isJetsonBuild;
in
backendStdenv.mkDerivation {
  pname = "gpu-burn";
@@ -53,7 +53,7 @@ backendStdenv.mkDerivation {

  makeFlags = [
    "CUDAPATH=${getBin cuda_nvcc}"
    "COMPUTE=${last (map dropDot cudaCapabilities)}"
    "COMPUTE=${last (map dropDots cudaCapabilities)}"
    "IS_JETSON=${boolToString isJetsonBuild}"
  ];

+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ let
      ))
    else
      cudaCapability;
  cudaCapability' = lib.toInt (cudaPackages.flags.dropDot cudaCapabilityString);
  cudaCapability' = lib.toInt (cudaPackages.flags.dropDots cudaCapabilityString);

  mklSupport =
    assert accelIsValid;
Loading