Commit Graph

144 Commits

Author SHA1 Message Date
Florian Klink
5144dc2669 cudatoolkit: fix evaluation with Nix 2.3
Path interpolation is not available in all Nix versions nixpkgs supports.

Similar to 6c8644fc37
2023-10-06 15:10:52 +03: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
Someone Serge
065f90d25c
cudaPackages.autoAddOpenGLRunpathHook: don't skip shared libraries 2023-08-22 03:14:47 +03:00
Elliot Cameron
03e72e46cb cudaPackages.autoAddOpenGLRunpathHook: fix to skip unsupported/unneed 2023-08-05 21:08:50 -04:00
Samuel Ainsworth
931999d13b
Merge pull request #235024 from deshaw/upstream-dcgm
Add NVIDIA DCGM and DCGM-exporter (prometheus)
2023-07-26 14:48:38 -07:00
Elliot Cameron
5ba94f8629 cudatoolkit: fix build for 12.0.1
Many Qt dependencies were added only for 12.1 and above, but 12.0.1 also
needs them.
2023-07-26 16:11:54 -04:00
Elliot Cameron
65497764e8 cudatoolkit: fix builds for 10.*
libnvrtc.so is not found in the same location in all versions of
cudatoolkit.
2023-07-26 16:11:54 -04:00
Connor Baker
5825210d3f
Merge pull request #233581 from SomeoneSerge/CUDAToolkit_ROOT
cudaPackages.setupCudaHook: init
2023-07-25 14:24:12 -04:00
Someone Serge
4fafb3b90b
tree-wide: incorporate common out-of-tree cudaSupport overlays 2023-07-20 17:26:45 +03:00
Someone Serge
251d3166c5
cudaPackages.saxpy: init at unstable-2023-07-11 2023-07-20 02:17:56 +03:00
Someone Serge
bfb24acbd0
cudaPackages_10.cudatoolkit: fix infinite recursion in setupCudaHook 2023-07-20 02:17:56 +03:00
Someone Serge
9f46beb6a7
cudaPackages.setupCudaHook: init 2023-07-19 23:01:50 +03:00
Dessix
532a7d3f1d cudaPackages_12_2.cudatoolkit: init at 12.2.0
Fixed #239557 via autoPatchelf to `qt6.(...)` packages.
2023-07-03 14:35:09 -07:00
Felix Buehler
6672dde558 treewide: use optionalAttrs instead of 'else {}' 2023-06-25 11:01:34 -03:00
Dessix
2ef48c49a5 cudaPackages_12_1.cudatoolkit: fix missing build dependencies
Dependencies on gstreamer and curl were added starting in cudatoolkit 12.1; this compensates for the resulting autoPatchelf failures.
2023-06-20 13:40:07 -07:00
Break Yang
9b804b8941 cudaPackages.cudatoolkit: mark libnvrtc-builtins needed for libnvrtc
libnvrtc dlopens libnvrtc-builtins without listing it in DT_NEEDED, thus it was being stripped out from the runpath
2023-06-05 09:20:46 -07:00
Connor Baker
bbe6b21356 cudaPackages_11_8.cudatoolkit: remove broken include/include symlink
The broken symlink was causing tensorflow to fail to build.
2023-05-25 15:45:48 -04:00
figsoda
98b9e41f61 pkgs: fix typos 2023-05-19 22:31:04 -04:00
Ryan Lahfa
588058a0af
Merge pull request #224358 from SomeoneSerge/team-list-cuda
team-list: add cuda team
2023-05-05 16:44:05 +02:00
Connor Baker
9d27bdd3b5
Merge pull request #227962 from ConnorBaker/feat/cuda-12_1_1
cudaPackages_12_1: init at 12.1.1; cudnn: don't break cudaPackages
2023-04-30 12:43:45 -07:00
Connor Baker
3b143e37e7 cudaPackages_12_1: init at 12.1.1; cudnn: don't break cudaPackages when unsupported
The `throwIf` expression in CUDNN was evaluated eagerly and essentially prevented the use of cudaPackages without a supported version of CUDNN (even when CUDNN was not requested).
2023-04-25 14:07:39 -04:00
Guillaume Maudoux
46a39c48c0
Merge pull request #226038 from SomeoneSerge/cuda_nvrtc-origin
cudaPackages: append $ORIGIN to Runpaths
2023-04-14 11:28:16 +02:00
Someone Serge
97870fb60c
cudaPackages: append $ORIGIN to runtime paths 2023-04-13 19:12:37 +03:00
Someone Serge
ad0606288b
cudaPackages.backendStdenv: cc and libstdc++ as arguments; expose libstdc++ 2023-04-13 01:45:49 +03:00
Samuel Ainsworth
cd07e0258c
Merge pull request #223664 from SomeoneSerge/cuda-libstdcpp
cudaPackages: use the same libstdc++ as the rest of nixpkgs
2023-04-07 11:46:55 -04:00
Someone Serge
3af299f014
cudaPackages.cudatoolkit: hotfix the libstdc++ mismatch caused by cudatoolkit-vendored copy of the library 2023-04-07 00:28:02 +03:00
Someone Serge
bd62420fd3
cudaPackages: use same libstdc++ as the rest of nixpkgs 2023-04-07 00:28:02 +03:00
Someone Serge
b100b0a1cc
cudaPackages_11_8: un-break after migrating to autoPatchelfHook 2023-04-06 22:30:11 +03:00
Someone Serge
221fe82378
cudaPackages_12.cudatoolkit: fix after migrating to autoPatchelfHook 2023-04-06 22:30:10 +03:00
Someone Serge
868c289955
cudaPackages.cudatoolkit: move pre-cuda11 deps up, to reorder chronologically 2023-04-06 22:30:10 +03:00
Someone Serge
c690aac0c6
cudaPackages: add teams.cuda to maintainers 2023-04-03 18:28:06 +03:00
Someone Serge
15848ffa42
cudaPackages.cudatoolkit: rm preFixup rpath code
...the same logic is handled by autoPatchelf
2023-04-02 01:09:34 +03:00
Someone Serge
6dc90880de
cudaPackages.cudatoolkit: use autoPatchelf
...to ensure correctness (in the sense that all DT_NEEDED libraries are
verified to be discoverable through the runpaths)
2023-04-02 01:08:41 +03:00
Connor Baker
bdfb61e117 cudaPackages: use -Xfatbin=-compress-all; prune default cudaCapabilities 2023-03-10 23:10:57 -05:00
Someone Serge
ac64f07f9c
cudaPackages.cudaFlags: drop unused capabilitiesAndForward 2023-03-04 03:14:37 +02:00
Someone Serge
0c25f5aa7f
cudaPackages.cudatoolkit: remove unused gcc argument 2023-03-04 03:14:37 +02:00
Someone Serge
8bf5f5ac89
magma: use CMAKE_CUDA_ARCHITECTURES directly 2023-03-04 01:04:25 +02:00
Someone
c376c54f70
cudaPackages.cudatoolkit: refactor inheriting passthru.cc
Co-authored-by: Connor Baker <ConnorBaker01@Gmail.com>
2023-03-04 01:04:25 +02:00
Someone Serge
17248123b6
cudaPackages_12: use gcc12 2023-03-04 01:04:25 +02:00
Someone Serge
5f4bdbe6c3
python3Packages.tensorflow: fix `GLIBCXX_3.4.30' not found
Make tensorflow (and a bunch of ther things) use CUDA-compatible
toolchain. Introduces cudaPackages.backendStdenv
2023-03-04 01:03:51 +02:00
Someone Serge
d378cc6fb2
opencv4: respect config.cudaCapabilities
This is needed for faster builds when debugging the opencv derivation,
and it's more consistent with other cuda-enabled packages

-DCUDA_GENERATION seems to expect architecture names, so we refactor
cudaFlags to facilitate easier extraction of the configured archnames
2023-03-04 00:59:21 +02:00
Someone Serge
cf7fb1d08f
python3Packages.tensorflow: add cudaCapabilities argument
Rearrange tensorflow to allow overriding cudaCapabilities.
This is needed when debugging the tensorflow derivation
2023-03-04 00:59:21 +02:00
Someone Serge
94bbbb0471
cudaPackages: point nvcc at a compatible -ccbin
This is a hot-fix to un-break cuda-enabled packages (like tensorflow,
jaxlib, faiss, opencv, ...) after the gcc11->gcc12 bump. We should
probably build the whole downstream packages with a compatible stdenv
(such as gcc11Stdenv for cudaPackages_11), but just pointing nvcc at the
right compiler seems to do the trick

We already used this hack for non-redist cudatoolkit. Now we use it more
consistently.

This commit also re-links cuda packages against libstdc++ from the same
"compatible" gcc, rather than the current stdenv. We didn't test if this
is necessary -> need to revise in further PRs.

NOTE: long-term we should make it possible to override -ccbin and use
e.g. clang
2023-03-04 00:59:20 +02:00
Connor Baker
dddc103fdb cudaFlags: rewrite to capture all architechtures and fix #215436 2023-02-23 16:34:12 -05:00
Samuel Ainsworth
dc3ac9dc42
Merge pull request #217322 from ConnorBaker/cudatoolkit-prune-broken-symlinks
cudatoolkit: prune broken symlinks in `postFixup`
2023-02-22 22:42:42 -05:00
Connor Baker
c181273423 cudaPackages_12: 12.0.0 -> 12.0.1 2023-02-22 13:19:49 -05:00
Connor Baker
476de5c070 cudatoolkit: prune broken symlinks in postFixup
As cudatoolkit is currently written, 11.8 introduces a broken symlink in `include` (also named `include`) and in `lib` (named `lib64`).

This trips up some consumers, like `tensorflow-gpu`.
2023-02-21 20:39:00 -05:00
Samuel Ainsworth
035e7d3d75 cudaPackages_12: init at 12.0.0 2023-01-11 00:36:36 +00:00
Samuel Ainsworth
9756d10158 cudaPackages.cudatoolkit: python27 -> python3
python27 was recently marked as insecure, breaking cudaPackages.cudatoolkit. This commit has been successfully tested against the earliest supported, 10.0, and the latest supported, 11.8, with the assumption that intermediate versions ought to work as well.
2023-01-08 03:47:26 +00: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