Commit Graph

13 Commits

Author SHA1 Message Date
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