From bfaefd0873a91aaffaae4254da5734f2fb311f48 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Tue, 7 Nov 2023 14:35:37 +0000 Subject: cudaPackages: add docs --- doc/languages-frameworks/cuda.section.md | 47 ++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 9 deletions(-) (limited to 'doc/languages-frameworks') diff --git a/doc/languages-frameworks/cuda.section.md b/doc/languages-frameworks/cuda.section.md index 01a4f20da982d..11c86e375c610 100644 --- a/doc/languages-frameworks/cuda.section.md +++ b/doc/languages-frameworks/cuda.section.md @@ -68,16 +68,45 @@ All new projects should use the CUDA redistributables available in [`cudaPackage ### Updating CUDA redistributables {#updating-cuda-redistributables} 1. Go to NVIDIA's index of CUDA redistributables: -2. Copy the `redistrib_*.json` corresponding to the release to `pkgs/development/compilers/cudatoolkit/redist/manifests`. -3. Generate the `redistrib_features_*.json` file by running: +2. Make a note of the new version of CUDA available. +3. Run - ```bash - nix run github:ConnorBaker/cuda-redist-find-features -- - ``` + ```bash + nix run github:connorbaker/cuda-redist-find-features -- \ + download-manifests \ + --log-level DEBUG \ + --version \ + https://developer.download.nvidia.com/compute/cuda/redist \ + ./pkgs/development/cuda-modules/cuda/manifests + ``` + + This will download a copy of the manifest for the new version of CUDA. +4. Run + + ```bash + nix run github:connorbaker/cuda-redist-find-features -- \ + process-manifests \ + --log-level DEBUG \ + --version \ + https://developer.download.nvidia.com/compute/cuda/redist \ + ./pkgs/development/cuda-modules/cuda/manifests + ``` + + This will generate a `redistrib_features_.json` file in the same directory as the manifest. +5. Update the `cudaVersionMap` attribute set in `pkgs/development/cuda-modules/cuda/extension.nix`. + +### Updating cuTensor {#updating-cutensor} + +1. Repeat the steps present in [Updating CUDA redistributables](#updating-cuda-redistributables) with the following changes: + - Use the index of cuTensor redistributables: + - Use the newest version of cuTensor available instead of the newest version of CUDA. + - Use `pkgs/development/cuda-modules/cutensor/manifests` instead of `pkgs/development/cuda-modules/cuda/manifests`. + - Skip the step of updating `cudaVersionMap` in `pkgs/development/cuda-modules/cuda/extension.nix`. - That command will generate the `redistrib_features_*.json` file in the same directory as the manifest. +### Updating supported compilers and GPUs {#updating-supported-compilers-and-gpus} -4. Include the path to the new manifest in `pkgs/development/compilers/cudatoolkit/redist/extension.nix`. +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. ### Updating the CUDA Toolkit runfile installer {#updating-the-cuda-toolkit} @@ -99,7 +128,7 @@ All new projects should use the CUDA redistributables available in [`cudaPackage nix store prefetch-file --hash-type sha256 ``` -4. Update `pkgs/development/compilers/cudatoolkit/versions.toml` to include the release. +4. Update `pkgs/development/cuda-modules/cudatoolkit/releases.nix` to include the release. ### Updating the CUDA package set {#updating-the-cuda-package-set} @@ -107,7 +136,7 @@ All new projects should use the CUDA redistributables available in [`cudaPackage - NOTE: Changing the default CUDA package set should occur in a separate PR, allowing time for additional testing. -2. Successfully build the closure of the new package set, updating `pkgs/development/compilers/cudatoolkit/redist/overrides.nix` as needed. Below are some common failures: +2. Successfully build the closure of the new package set, updating `pkgs/development/cuda-modules/cuda/overrides.nix` as needed. Below are some common failures: | Unable to ... | During ... | Reason | Solution | Note | | --- | --- | --- | --- | --- | -- cgit 1.4.1