Commit graph

27 commits

Author SHA1 Message Date
Wolfgang Walther a46262ae77
treewide: run treefmt with mdcr/nixfmt 2025-07-24 14:58:15 +02:00
Dan Baker ae4a5ec070 doc: CUDA section fixups
Co-authored-by: Connor Baker <ConnorBaker01@gmail.com>

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 0ff3ee0540)
2025-07-22 14:25:00 +00:00
Connor Baker cf0d992bfd doc: introduce CUDA user guide
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit fa4f91662a)
2025-07-22 14:25:00 +00:00
Connor Baker 32cc0153bc doc: CUDA section fixups
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 18cdc0858a)
2025-07-22 14:25:00 +00:00
Connor Baker 4e062a31d6 doc: add sections for cudaPackages.pkgs, pkgsCuda, and pkgsForCudaArch
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 544be187c0)
2025-07-22 14:25:00 +00:00
Connor Baker c2c335d15e _cuda.extensions: make overriding all CUDA package sets easier
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 36d409bc3a)
2025-07-22 14:24:59 +00:00
Connor Baker d028c1cb81 doc: CUDA section fixups and describe _cuda.fixups
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit b0f64f56be)
2025-07-22 14:24:59 +00:00
Connor Baker fd4dbd89d4 doc: add CUDA contributing section and document passthru test attributes
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 91e91bc596)
2025-07-14 11:21:21 -07:00
Connor Baker 574561de38 doc: correct paths in CUDA update section
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 3f0d99c733)
2025-06-12 17:38:23 +00:00
Connor Baker c3fdb7a77c _cuda: introduce to organize CUDA package set backbone
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit 688e14d21a)
2025-05-27 15:39:01 +00:00
Connor Baker 9e09b54794 cudaPackages: switch to cudaLib
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
(cherry picked from commit c5dad2886a)
2025-05-27 15:39:01 +00:00
Pol Dellaiera bcea0cf344 doc: update Nix code snippets format
Command: `mdcr --config doc/tests/mdcr-config.toml doc/`
2025-04-17 01:30:34 +02:00
Rafael Fernández López 0af55cfcbe docs: update docker and podman anchor on CUDA section 2024-10-30 13:45:50 +01:00
Rafael Fernández López 7115576407 docs: update the CUDA section with how to use the nvidia-container-toolkit
This part of the manual explains how to use the
`nvidia-container-toolkit` in order to expose GPU's both for Docker
and Podman, as well as for a `docker-compose` environment.
2024-09-24 13:03:13 +02:00
Jonathan Ringer e660db3233 docs/cuda: remove last references to cudaPackages.autoAddDriverRunpath 2024-04-23 08:12:34 -07:00
Janne Heß fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Yann Hamdaoui 63746cac08
cudaPackages: generalize and refactor setup hook
This PR refactor CUDA setup hooks, and in particular
autoAddOpenGLRunpath and autoAddCudaCompatRunpathHook, that were using a
lot of code in common (in fact, I introduced the latter by copy pasting
most of the bash script of the former). This is not satisfying for
maintenance, as a recent patch showed, because we need to duplicate
changes to both hooks.

This commit abstract the common part in a single shell script that
applies a generic patch action to every elf file in the output. For
autoAddOpenGLRunpath the action is just addOpenGLRunpath (now
addDriverRunpath), and is few line function for
autoAddCudaCompatRunpathHook.

Doing so, we also takes the occasion to use the newer addDriverRunpath
instead of the previous addOpenGLRunpath, and rename the CUDA hook to
reflect that as well.

Co-Authored-By: Connor Baker <connor.baker@tweag.io>
2024-03-15 15:54:21 +01:00
Connor Baker bfaefd0873 cudaPackages: add docs 2023-12-07 16:45:56 +00:00
Connor Baker d5e5246e76 cudaPackages: split outputs
This change which involves creating multiple outputs for CUDA
redistributable packages.

We use a script to find out, ahead of time, the outputs each redist
package provides. From that, we are able to create multiple outputs for
supported redist packages, allowing users to specify exactly which
components they require.

Beyond the script which finds outputs ahead of time, there is some custom
code involved in making this happen. For example, the way Nixpkgs
typically handles multiple outputs involves making `dev` the default
output when available, and adding `out` to `dev`'s
`propagatedBuildInputs`.

Instead, we make each output independent of the others. If a user wants
only to include the headers found in a redist package, they can do so by
choosing the `dev` output. If they want to include dynamic libraries,
they can do so by specifying the `lib` output, or `static` for static
libraries.

To avoid breakages, we continue to provide the `out` output, which
becomes the union of all other outputs, effectively making the split
outputs opt-in.
2023-08-31 03:31:55 +00:00
Artturin b93da3f4b7 treewide: overrideScope' -> overrideScope
`lib.makeScope` `overrideScope'` has been renamed to `overrideScope`

`fd --type f | xargs sd --string-mode "overrideScope'" "overrideScope"`
2023-08-14 18:46:47 +03:00
Someone Serge 133993211b
config.cudaSupport: init option 2023-07-20 17:57:31 +03:00
Someone Serge a17baa5db4
doc: update #cuda to reflect the recommended config.cudaSupport style 2023-07-20 17:27:07 +03:00
Connor Baker 222d966273 cudaPackages.cudnn: remove patch version from name to conform with cudaPackages standard 2023-05-24 12:56:22 -04:00
Hraban Luyat 7282c4012d docs: typo in cuda docs, forgot a colon (:) 2023-05-10 14:32:27 -04:00
figsoda 403e25e3e3 doc: fix typos 2022-12-17 18:21:48 -05:00
Jason Miller 8392158289
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
2022-12-16 22:00:36 -08:00
Frederik Rietdijk 1d63f89caa cudaPackages: overhaul of how we package cuda packages
There are many different versions of the `cudatoolkit` and related
cuda packages, and it can be tricky to ensure they remain compatible.

- `cudaPackages` is now a package set with `cudatoolkit`, `cudnn`, `cutensor`, `nccl`, as well as `cudatoolkit` split into smaller packages ("redist");
- expressions should now use `cudaPackages` as parameter instead of the individual cuda packages;
- `makeScope` is now used, so it is possible to use `.overrideScope'` to set e.g. a different `cudnn` version;
- `release-cuda.nix` is introduced to easily evaluate cuda packages using hydra.
2022-04-09 08:50:22 +02:00