Skip to content

caffe: use pre-CUDNN 8.x#217330

Merged
samuela merged 1 commit intoNixOS:masterfrom
ConnorBaker:fix/caffe-use-pre-cudnn8
Feb 22, 2023
Merged

caffe: use pre-CUDNN 8.x#217330
samuela merged 1 commit intoNixOS:masterfrom
ConnorBaker:fix/caffe-use-pre-cudnn8

Conversation

@ConnorBaker
Copy link
Contributor

@ConnorBaker ConnorBaker commented Feb 20, 2023

Description of changes

Since #215578, the default for cudatoolkit 10.1 is CUDNN 8.0.5, the last version to support CUDA 10.1. However, caffe does not build with CUDNN 8.x, so we use CUDNN 7.6.5 instead. Earlier versions of cudatoolkit use pre-8.x CUDNN, so we use the default.

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
Copy link
Contributor Author

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

1 package marked as broken and skipped:
  • python310Packages.caffeWithCuda
1 package built:
  • caffeWithCuda

@ConnorBaker ConnorBaker marked this pull request as ready for review February 20, 2023 16:39
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Feb 20, 2023
@ConnorBaker
Copy link
Contributor Author

@abbradar @avitex would you mind giving this a quick once-over? The change is the addition of a conditional to ensure caffe isn't built with a version of CUDNN which is too new.

@samuela
Copy link
Member

samuela commented Feb 20, 2023

cc @NixOS/cuda-maintainers

@samuela
Copy link
Member

samuela commented Feb 21, 2023

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

1 package marked as broken and skipped:
  • python310Packages.caffeWithCuda
1 package built:
  • caffeWithCuda

@ConnorBaker ConnorBaker force-pushed the fix/caffe-use-pre-cudnn8 branch from 0b2dda5 to 291db05 Compare February 22, 2023 01:33
@ConnorBaker ConnorBaker requested a review from samuela February 22, 2023 01:34
@ConnorBaker
Copy link
Contributor Author

Removed the useless check in assert that CUDNN was of the correct version given that the let statement handles that.

Also removed the PR stack info in the header because it can be merged independently of the others.

@samuela
Copy link
Member

samuela commented Feb 22, 2023

Is there a reason to support cuda < 10.1? Why not just mark caffe as broken for cuda versions that are too old?

@ConnorBaker
Copy link
Contributor Author

Maybe the way I wrote the if expression is weird -- CUDA 10.0 and all the prior versions of CUDA work fine because they only support up to CUDNN 7.6.5. (That's why we use their default cudaPackages.cudnn and don't need to fish around for a different version.)

CUDA 10.1 is special because it's the only release in the 10.x series to be supported by a version of CUDNN 8 (it's supported by CUDNN 8.0.5). So in the special case where we have 10.1, we need to fall back to the older version of CUDNN.

@samuela
Copy link
Member

samuela commented Feb 22, 2023

Ahh, I misunderstood -- thank you for explaining! Ok this LGTM then

@samuela samuela merged commit 2308c63 into NixOS:master Feb 22, 2023
@ConnorBaker ConnorBaker deleted the fix/caffe-use-pre-cudnn8 branch February 22, 2023 18:25
@nixos-discourse
Copy link

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

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants