Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.pytorchWithCuda: consistent cuda #166734

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8360,9 +8360,18 @@ in {

pytools = callPackage ../development/python-modules/pytools { };

pytorch = callPackage ../development/python-modules/pytorch {
cudaSupport = pkgs.config.cudaSupport or false;
};
pytorch =
let
cudnn = pkgs.cudnn_8_3_cudatoolkit_11;
cudatoolkit = cudnn.cudatoolkit;
Comment on lines +8365 to +8366
Copy link
Member

Choose a reason for hiding this comment

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

IIUC pkgs.cudnn_8_3_cudatoolkit_11 will pull in cudatoolkit_11_5 and cudnn.cudatoolkit will pull in cudatoolkit_10_1. Just as a heads up.

This is still strictly better than broken, but worth noting that it still does pull in multiple CUDA versions AFAIU

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait, what o_0

Copy link
Member

Choose a reason for hiding this comment

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

IIUC cudnn currently points to cudnn_7_6_cudatoolkit_10_1

Copy link
Member

Choose a reason for hiding this comment

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

Check out the diff in #166784

Copy link
Member

Choose a reason for hiding this comment

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

oh wait... maybe I'm being an idiot. I guess this is like a let-rec binding so cudnn refers to the definition just prior. ok in that case nvm!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😓 I thought for a moment the same, but

nix-repl> pkgs.cudnn_8_3_cudatoolkit_11.cudatoolkit.version
"11.5.0"

magma = pkgs.magma.override { inherit cudatoolkit; };
nccl = pkgs.nccl.override { inherit cudatoolkit; };
in
callPackage ../development/python-modules/pytorch
{
cudaSupport = pkgs.config.cudaSupport or false;
inherit cudnn cudatoolkit magma nccl;
};

pytorch-bin = callPackage ../development/python-modules/pytorch/bin.nix { };

Expand Down