Skip to content

Commit

Permalink
pythonPackages.pytorch: 1.4.1 -> 1.5.0
Browse files Browse the repository at this point in the history
Fixes previous bugs that required a patch
Fixes CUDA build, see #89403
  • Loading branch information
Guillaume Desforges authored and Jon committed Jun 8, 2020
1 parent 3ee1dcc commit 0574ace
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions pkgs/development/python-modules/pytorch/default.nix
Expand Up @@ -104,7 +104,7 @@ let
"LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ";

in buildPythonPackage rec {
version = "1.4.1";
version = "1.5.0";
pname = "pytorch";
disabled = !isPy3k;

Expand All @@ -118,7 +118,7 @@ in buildPythonPackage rec {
repo = "pytorch";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "1aa1il4f98pswfj20cv27yfb91l1jcq4515i7mvq7sh5647yzwms";
sha256 = "19qyrjd72mc0llcfn50av8ym05f2iwa38gv068wykji4ph7qjlv2";
};

preConfigure = lib.optionalString cudaSupport ''
Expand All @@ -128,24 +128,6 @@ in buildPythonPackage rec {
export CUDNN_INCLUDE_DIR=${cudnn}/include
'';

patches = [
# Prevents a race condition which would be introduced by pull 30333.
# See https://github.com/pytorch/pytorch/issues/32277
# Can be removed >1.5.0.
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/30332.patch";
sha256 = "1v9dwbhz3rdxcx6sz8y8j9n3bj6nqs78b1r8yg89yc15n6l4cqx2";
})

# Fixes errors with gcc-9 compilation. Cherry-picked on advice from ezyang.
# See https://github.com/pytorch/pytorch/issues/32277
# Can be removed >1.5.0.
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/pytorch/pytorch/pull/30333.patch";
sha256 = "139413fl37h2fnil0cv99a67mqqnsh02k74b92by1qyr6pcfyg3q";
})
];

# Use pytorch's custom configurations
dontUseCmakeConfigure = true;

Expand Down

0 comments on commit 0574ace

Please sign in to comment.