python3Packages.torch: 1.11.0 -> 1.12.1
https://github.com/pytorch/pytorch/releases/tag/v1.12.0 https://github.com/pytorch/pytorch/releases/tag/v1.12.1
This commit is contained in:
parent
ac45560964
commit
9b183572a7
|
@ -1,13 +0,0 @@
|
|||
diff --git a/third_party/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
index ca353c4099..499be0a986 100644
|
||||
--- a/third_party/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ b/third_party/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
|
||||
// SIGSTKSZ may be too small to prevent the signal handlers from overrunning
|
||||
// the alternative stack. Ensure that the size of the alternative stack is
|
||||
// large enough.
|
||||
- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
|
||||
+ const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);
|
||||
|
||||
// Only set an alternative stack if there isn't already one, or if the current
|
||||
// one is too small.
|
|
@ -122,7 +122,7 @@ let
|
|||
in buildPythonPackage rec {
|
||||
pname = "torch";
|
||||
# Don't forget to update torch-bin to the same version.
|
||||
version = "1.11.0";
|
||||
version = "1.12.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7.0";
|
||||
|
@ -136,17 +136,12 @@ in buildPythonPackage rec {
|
|||
src = fetchFromGitHub {
|
||||
owner = "pytorch";
|
||||
repo = "pytorch";
|
||||
rev = "v${version}";
|
||||
rev = "refs/tags/v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-CEu63tdRBAF8CTchO3Qu8gUNObQylX6U08yDTI4/c/0=";
|
||||
hash = "sha256-8378BVOBFCRYRG1+yIYFSPKmb1rFOLgR+8pNZKt9NfI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix for a breakpad incompatibility with glibc>2.33
|
||||
# https://github.com/pytorch/pytorch/issues/70297
|
||||
# https://github.com/google/breakpad/commit/605c51ed96ad44b34c457bbca320e74e194c317e
|
||||
./breakpad-sigstksz.patch
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
# pthreadpool added support for Grand Central Dispatch in April
|
||||
# 2020. However, this relies on functionality (DISPATCH_APPLY_AUTO)
|
||||
# that is available starting with macOS 10.13. However, our current
|
||||
|
@ -243,15 +238,17 @@ in buildPythonPackage rec {
|
|||
pillow six future tensorboard protobuf
|
||||
] ++ lib.optionals MPISupport [ mpi ];
|
||||
|
||||
checkInputs = [ hypothesis ninja psutil ];
|
||||
|
||||
# Tests take a long time and may be flaky, so just sanity-check imports
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"torch"
|
||||
];
|
||||
|
||||
checkInputs = [ hypothesis ninja psutil ];
|
||||
|
||||
checkPhase = with lib.versions; with lib.strings; concatStringsSep " " [
|
||||
"runHook preCheck"
|
||||
cudaStubEnv
|
||||
"${python.interpreter} test/run_test.py"
|
||||
"--exclude"
|
||||
|
@ -264,7 +261,9 @@ in buildPythonPackage rec {
|
|||
# tensorboard has acceptable failures for pytorch 1.3.x due to dependencies on tensorboard-plugins
|
||||
(optionalString (majorMinor version == "1.3" ) "tensorboard")
|
||||
])
|
||||
"runHook postCheck"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
find "$out/${python.sitePackages}/torch/include" "$out/${python.sitePackages}/torch/lib" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
||||
|
||||
|
@ -312,11 +311,12 @@ in buildPythonPackage rec {
|
|||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source, prototype-to-production deep learning platform";
|
||||
changelog = "https://github.com/pytorch/pytorch/releases/tag/v${version}";
|
||||
# keep PyTorch in the description so the package can be found under that name on search.nixos.org
|
||||
description = "PyTorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration";
|
||||
homepage = "https://pytorch.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ teh thoughtpolice tscholak ]; # tscholak esp. for darwin-related builds
|
||||
platforms = with platforms; linux ++ lib.optionals (!cudaSupport) darwin;
|
||||
broken = stdenv.isLinux && stdenv.isAarch64;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10929,7 +10929,6 @@ in {
|
|||
|
||||
torch-bin = callPackage ../development/python-modules/torch/bin.nix { };
|
||||
|
||||
|
||||
torchWithCuda = self.torch.override {
|
||||
cudaSupport = true;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue