Skip to content

cudnn: init 8.8.0; rewrite to assist maintainability - #217363

Merged
samuela merged 1 commit into
NixOS:masterfrom
ConnorBaker:feat/cudnn-8.8.0
Feb 28, 2023
Merged

samuela merged 1 commit into
NixOS:masterfrom
ConnorBaker:feat/cudnn-8.8.0

Conversation

@ConnorBaker

@ConnorBaker ConnorBaker commented Feb 20, 2023 •

Copy link
Copy Markdown
Contributor
Description of changes

Adds CUDNN 8.8.0.

Rewrites the cudnn package to move objects out of the nix files and into a more easily maintainable sorted JSON array.

Instead of hardcoding the default version of CUDNN for each CUDA release, it is now chosen based on the versions available in releases.json.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ConnorBaker ConnorBaker mentioned this pull request Feb 20, 2023
2 of 13 tasks
@ofborg ofborg Bot added the 8.has: package (new) This PR adds a new package label Feb 20, 2023
@ofborg
ofborg Bot requested review from mdaiter and samuela February 20, 2023 21:45
@ofborg ofborg Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 20, 2023
@ConnorBaker

Copy link
Copy Markdown
Contributor Author

Result of nixpkgs-review pr 217363 run on x86_64-linux 1

2 packages failed to build:
  • python310Packages.tensorflowWithCuda
  • python311Packages.tensorrt
12 packages built:
  • cudaPackages.cudnn
  • cudaPackages.cudnn_8_7_0
  • cudaPackages.tensorrt
  • katagoWithCuda
  • python310Packages.TheanoWithCuda
  • python310Packages.cupy
  • python310Packages.jaxlibWithCuda
  • python310Packages.tensorrt
  • python310Packages.torchWithCuda
  • python311Packages.TheanoWithCuda
  • python311Packages.cupy
  • python311Packages.jaxlibWithCuda

@ConnorBaker
ConnorBaker marked this pull request as ready for review February 20, 2023 22:41
@ConnorBaker

Copy link
Copy Markdown
Contributor Author

cc @NixOS/cuda-maintainers

@samuela samuela left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing @ConnorBaker ! Overall I feel that this is a step forward. However, why use json instead of Nix for the releases info?

Also IIRC I originally wrote cudnn such that it had version constraints for each package like this, but we got rid of it at some point. I don't recall exactly why... I do remember there being a point where one of the CUDA releases required a cuDNN but there was no compatible version in the official table. Other distros were just winging it with whatever latest cudnn was and I think we ended up doing the same. I'm not opposed to this design, but might be worth checking the history to see why it was removed before.

@ConnorBaker

Copy link
Copy Markdown
Contributor Author

Will also rewrite the releases as Nix here

@ofborg
ofborg Bot requested a review from samuela February 24, 2023 01:50
@samuela

samuela commented Feb 24, 2023

Copy link
Copy Markdown
Member

Result of nixpkgs-review pr 217363 run on x86_64-linux 1

13 packages failed to build:
  • cudaPackages.cudnn (cudaPackages.cudnn_8_8_0)
  • cudaPackages.tensorrt (cudaPackages.tensorrt_8_4_0)
  • katagoWithCuda
  • python310Packages.TheanoWithCuda
  • python310Packages.cupy
  • python310Packages.jaxlibWithCuda
  • python310Packages.tensorflowWithCuda
  • python310Packages.tensorrt
  • python310Packages.torchWithCuda
  • python311Packages.TheanoWithCuda
  • python311Packages.cupy
  • python311Packages.jaxlibWithCuda
  • python311Packages.tensorrt

@samuela

samuela commented Feb 24, 2023

Copy link
Copy Markdown
Member

I'm seeing the following error:

error: builder for '/nix/store/0sczii183mc2wkx9xlx5a7839cdymapj-cudnn-linux-x86_64-8.8.0.121_cuda11-archive.tar.xz.drv' failed with exit code 1;
       last 10 log lines:
       > Warning: Problem : timeout. Will retry in 1 seconds. 3 retries left.
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: https
       > Warning: Problem : timeout. Will retry in 2 seconds. 2 retries left.
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: https
       > Warning: Problem : timeout. Will retry in 4 seconds. 1 retries left.
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: https
       >
       > trying =//developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.8.0.121_cuda11-archive.tar.xz
       > curl: (3) URL using bad/illegal format or missing URL
       > error: cannot download cudnn-linux-x86_64-8.8.0.121_cuda11-archive.tar.xz from any mirror
       For full logs, run 'nix log /nix/store/0sczii183mc2wkx9xlx5a7839cdymapj-cudnn-linux-x86_64-8.8.0.121_cuda11-archive.tar.xz.drv'.

@ConnorBaker

Copy link
Copy Markdown
Contributor Author

Sorry, that was the result of a regex gone awry! Should be fixed now

@ofborg
ofborg Bot requested a review from samuela February 25, 2023 03:29
@ConnorBaker

Copy link
Copy Markdown
Contributor Author

Result of nixpkgs-review pr 217363 run on x86_64-linux 1

4 packages failed to build:
  • cudaPackages.tensorrt (cudaPackages.tensorrt_8_4_0)
  • python310Packages.tensorflowWithCuda
  • python310Packages.tensorrt
  • python311Packages.tensorrt
9 packages built:
  • cudaPackages.cudnn (cudaPackages.cudnn_8_8_0)
  • katagoWithCuda
  • python310Packages.TheanoWithCuda
  • python310Packages.cupy
  • python310Packages.jaxlibWithCuda
  • python310Packages.torchWithCuda
  • python311Packages.TheanoWithCuda
  • python311Packages.cupy
  • python311Packages.jaxlibWithCuda

@ConnorBaker

ConnorBaker commented Feb 25, 2023 •

Copy link
Copy Markdown
Contributor Author
Failed derivations

@samuela

samuela commented Feb 28, 2023

Copy link
Copy Markdown
Member

Result of nixpkgs-review pr 217363 run on x86_64-linux 1

4 packages failed to build:
  • cudaPackages.tensorrt (cudaPackages.tensorrt_8_4_0)
  • python310Packages.tensorflowWithCuda
  • python310Packages.tensorrt
  • python311Packages.tensorrt
9 packages built:
  • cudaPackages.cudnn (cudaPackages.cudnn_8_8_0)
  • katagoWithCuda
  • python310Packages.TheanoWithCuda
  • python310Packages.cupy
  • python310Packages.jaxlibWithCuda
  • python310Packages.torchWithCuda
  • python311Packages.TheanoWithCuda
  • python311Packages.cupy
  • python311Packages.jaxlibWithCuda

@samuela
samuela merged commit 3bc99d8 into NixOS:master Feb 28, 2023
@ConnorBaker
ConnorBaker deleted the feat/cudnn-8.8.0 branch March 8, 2023 01:46
@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-45/26397/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants