Commit Graph

27 Commits

Author SHA1 Message Date
Emily
7dc35d8704
cudaPackages_{10*,11*}: warn about upcoming removal (#342112) 2024-10-03 13:48:13 +01:00
Emily
77eb5dfe22 cudaPackages_{10*,11*}: warn about upcoming removal
We currently package all CUDA versions from 10.0 onwards. In
some cases, CUDA is the only thing preventing us from removing old
versions of GCC. Since we currently don’t deprecate or remove CUDA
versions, this will be an increasing drag on compiler maintenance in
Nixpkgs going forward unless we establish a sensible policy. After
discussing this with @SomeoneSerge in the context of old versions
of GCC, I learned that there was already a desire to remove at least
versions prior to 11.3, as those versions were only packaged in the
old “runfile” format, but that it was blocked on someone doing
the work to warn about the upcoming deprecation for a release cycle.

This change adds a release note and warnings indicating that CUDA 10.x
and 11.x will be removed in Nixpkgs 25.05, about 8 months from now.

I chose this version cut‐off because these versions of CUDA require
GCC < 12. GCC releases a major version every year, and seems to
support about four releases at a time, releasing the last update to
the oldest version and marking it as unsupported on their site around
the time of the release of the next major version. Therefore, by the
time of the 25.05 release, we should expect GCC 15 to be released
and GCC 11 to become unsupported. Adding a warning and communicating
the policy of only shipping CUDA versions that work with supported
compilers in the release notes means that we should be able to
clean up old versions as required without any issue or extensive
deprecation period in future, without obligating us to do so if there
is a strongly compelling reason to be more lenient. That should help
solve both shipping an indefinitely‐growing list of CUDA versions
and an indefinitely‐growing list of GCC and LLVM versions.

As I’m not a user of CUDA myself, I can’t be sure of how sensible
this version support policy is, but I think it’s fair to say that
it’s reasonable for Nixpkgs to choose not to maintain compiler
versions that are unsupported upstream just for the sake of versions
of CUDA that are also unmaintained. CUDA 11.x has not received an
update for two years already, and would only become unsupported in
Nixpkgs in over half a year’s time.

CUDA 10.x is currently unused in‐tree except for the unmaintained
Caffe and NVIDIA DCGM, which depends on multiple CUDA versions solely
so that it can provide plugins for those versions. The latest DCGM
version has already removed support for CUDA 10.x and is just awaiting
an update in Nixpkgs. They maintain a list of supported versions to
build plugins for in their CMake build system, so it should be simple
enough for us to only build support for the versions of CUDA that we
support in Nixpkgs.

From what I can tell, CUDA 11.x is currently used by the following
packages other than DCGM:

* `catboost`, because of
  <https://github.com/catboost/catboost/issues/2540>. It looks like
  upstream has since redesigned this part of their build system, so
  perhaps the problem is no longer present, or would be easier to fix.

* `magma_2_6_2`, an old version from before upstream added CUDA
  12 support. This seems okay to break to me; that version is not
  maintained and will never be updated for new CUDA versions, and
  the CUDA support is optional.

* `paddlepaddle`, which, uh, also requires OpenSSL 1.1 of all
  things. <https://github.com/PaddlePaddle/Paddle/issues/67571>
  states that PaddlePaddle supports up to 12.3.

* `python3Packages.cupy`, which is listed as “possibly incompatible
  with cutensor 2.0 that comes with `cudaPackages_12`”. I’m
  not sure what the “possibly” means here, but according to
  <https://github.com/cupy/cupy/tree/v13.3.0?tab=readme-ov-file#installation>
  they ship binary wheels using CUDA 12.x so I think this should
  be fine.

* `python3Packages.tensorrt`, which supports CUDA 12.x going by
  <https://github.com/NVIDIA/TensorRT/blob/release/10.4/CMakeLists.txt#L111>.

* TensorFlow, which has a link to
  <https://www.tensorflow.org/install/source#gpu> above the
  `python3Packages.tensorflow-bin` definition, but that page lists
  the versions we package as supporting CUDA 12.x.

Given the years since CUDA 11.x received any update upstream, and the
seemingly very limited set of packages that truly require it, I think
the policy of being able to drop versions that require unsupported
compilers starting from the next Nixpkgs release is a reasonable
one, but of course I’m open to feedback from the CUDA maintainers
about this.
2024-09-26 00:38:18 +01:00
Connor Baker
7edb29bd29 cudaPackages.tests: create tests for OpenCV/Torch ordering 2024-09-25 02:55:35 +00:00
Someone Serge
2d5e573acf cudaPackages.writeGpuTestPython: sync the attr and the filesystem paths 2024-07-20 12:03:36 +00:00
Philip Taron
45a663d8ec
cudaPackages: move __attrsFailEvaluation to allow deeper inspection 2024-07-17 11:49:12 -07:00
Someone Serge
79a7186f1c cudaPackages: updated convention for gpu/runtime checks
Runtime tests (derivations asking for a relaxed sandbox) are now
expected at p.gpuCheck, p.gpuChecks.<name>, or at
p.tests.<name>.gpuCheck.
2024-06-26 16:00:29 +00:00
Connor Baker
c66994ce1c
Merge pull request #301416 from ConnorBaker/feat/cudaPackages-lessons-learned-from-cross-compilation-attempt
cuda-modules: apply lessons learned from cross-compilation attempts
2024-04-18 20:10:59 -04:00
Connor Baker
843b91a0ee cuda-modules/cuda/overrides: refactor 2024-04-18 16:31:18 +00:00
Someone Serge
8262bdf738 cudaPackages.cudatoolkit: replace with symlinkJoin 2024-04-13 10:28:07 +00:00
Connor Baker
93b08a7061 {pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
```bash
nix run github:NixOS/nixpkgs/ab6071eb54cc9b66dda436111d4f569e4e56cbf4#nixfmt-rfc-style -L --allow-import-from-derivation -- pkgs/development/cuda-modules pkgs/test/cuda pkgs/top-level/cuda-packages.nix
```
2024-04-01 01:14:28 +00:00
Jonathan Ringer
11387afc0d cudaPackages/aliases: init 2024-03-30 10:12:13 -07:00
Someone Serge
875e43dfd7
cudaPackages.cuda{,-library}-samples: move to cuda-modules/
cudaPackages are part of the package set and should not depend on pkgs/test
2024-01-12 20:24:50 +00:00
Connor Baker
9bebd9e72d tree-wide: cudaPackages should not break default eval
cudaPackages: guard expressions against null values
2024-01-10 01:15:01 +00:00
Connor Baker
501a1af970 cudaPackages.saxpy: now available pre-11.4 with CUDA Toolkit 2024-01-10 01:15:01 +00:00
Jonathan Ringer
b02dbb03fb cudaPackages: add cudaOlder and cudaAtLeast comparators 2024-01-03 19:49:28 -08:00
Adam Joseph
80472e3754 treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs 2023-12-15 05:13:46 -08:00
Connor Baker
aaf735eac9 cudaPackages.saxpy: only available from CUDA 11.4 and on 2023-12-07 16:45:56 +00:00
Connor Baker
8e800cedaf cudaPackages: move derivations to cuda-modules & support aarch64
cudaPackages.cuda_compat: ignore missing libs provided at runtime

cudaPackages.gpus: Jetson should never build by default

cudaPackages.flags: don't build Jetson capabilities by default

cudaPackages: re-introduce filter for pre-existing CUDA redist packages in overrides

cudaPackages: only recurseIntoAttrs for the latest of each major version

cudaPackages.nvccCompatabilities: use GCC 10 through CUDA 11.5 to avoid a GLIBC incompatability

cudaPackages.cutensor: acquire libcublas through cudatoolkit prior to 11.4

cudaPackages.cuda_compat: mark as broken on aarch64-linux if not targeting Jetson

cudaPackages.cutensor_1_4: fix build

cudaPackages: adjust use of autoPatchelfIgnoreMissingDeps

cudaPackages.cuda_nvprof: remove unecessary override to add addOpenGLRunpath

cudaPackages: use getExe' to avoid patchelf warning about missing meta.mainProgram

cudaPackages: fix evaluation with Nix 2.3

cudaPackages: fix platform detection for Jetson/non-Jetson aarch64-linux

python3Packages.tensorrt: mark as broken if required packages are missing

Note: evaluating the name of the derivation will fail if tensorrt is not present,
which is why we wrap the value in `lib.optionalString`.

cudaPackages.flags.getNixSystem: add guard based on jetsonTargets

cudaPackages.cudnn: use explicit path to patchelf

cudaPackages.tensorrt: use explicit path to patchelf
2023-12-07 16:45:54 +00:00
Someone Serge
0dc161b2f8
cudaPackages_12.cutensor: init and fix 2023-12-04 20:24:32 +00:00
Connor Baker
23144ffa59
Merge pull request #240015 from jmillerpdt/init-nccl-tests
nccl-tests: init at 2.13.6
2023-08-21 10:33:19 -04: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
Jason Miller
879d6402ac nccl-tests: init at 2.13.6 2023-06-26 23:07:20 +00:00
Artturin
4e3dcf364e treewide: makeSetupHook deps -> propagatedBuildInputs 2023-02-07 21:02:00 +02:00
Thomas Watson
2cec04c8a2 cudaPackages.cutensor: 1.3.1.3 -> 1.5.0.3
Update cutensor to the latest version compatible with its only dependent
in nixpkgs, cupy. Future work might wish to make multiple versions
available. Also update the URL format for all known versions.
2022-10-21 21:45:19 -05:00
Aidan Gauland
c8fba8254a
tensorrt: support multiple CUDA versions
Refactor derivation to pick the version that supports the current CUDA version.
Based on the implementation of the same concept in the cudnn derivation.
2022-07-02 14:12:41 +12:00
Aidan Gauland
d70b4df686
tensorrt: init at 8.4.0.6
Add derivation for TensorRT 8, a high-performance deep learning interface SDK
from NVIDIA, which is at this point non-redistributable.  The current version
aldo requires CUDA 11, so this is left out of the cudaPackages_10* scopes.
2022-06-24 13:02:02 +12: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