From ed09ac1fe5889a9b27c0b88fe97b50ffcdfa12aa Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 25 Dec 2022 14:34:41 +0000 Subject: [PATCH] libtorch-bin: 1.12.1 -> 1.13.1 now built with minimum cuda 116 --- .../libraries/science/math/libtorch/bin.nix | 2 +- .../science/math/libtorch/binary-hashes.nix | 37 +++++-------------- .../science/math/libtorch/prefetch.sh | 2 +- 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index f9b454a6f115..7f7093b24107 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -17,7 +17,7 @@ let # this derivation. However, we should ensure on version bumps # that the CUDA toolkit for `passthru.tests` is still # up-to-date. - version = "1.12.1"; + version = "1.13.1"; device = if cudaSupport then "cuda" else "cpu"; srcs = import ./binary-hashes.nix version; unavailable = throw "libtorch is not available for this platform"; diff --git a/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix b/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix index 0b5b4d05c0f6..5d5c795b6ede 100644 --- a/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix +++ b/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix @@ -1,36 +1,19 @@ version : builtins.getAttr version { - "1.10.0" = { + "1.13.1" = { x86_64-darwin-cpu = { - name = "libtorch-macos-1.10.0.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.10.0.zip"; - hash = "sha256-HSisxHs466c6XwvZEbkV/1kVNBzJOy3uVw9Bh497Vk8="; + name = "libtorch-macos-1.13.1.zip"; + url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.13.1.zip"; + hash = "sha256-2ITO1hO3qb4lEHO7xV6Dn6bhxI4Ia2TLulqs2LM7+vY="; }; x86_64-linux-cpu = { - name = "libtorch-cxx11-abi-shared-with-deps-1.10.0-cpu.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcpu.zip"; - hash = "sha256-wAtA+AZx3HjaFbsrbyfkSXjYM0BP8H5HwCgyHbgJXJ0="; + name = "libtorch-cxx11-abi-shared-with-deps-1.13.1-cpu.zip"; + url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcpu.zip"; + hash = "sha256-AXmlrtGNMVOYbQfvAQDUALlK1F0bMGNdm6RBtVuNvbo="; }; x86_64-linux-cuda = { - name = "libtorch-cxx11-abi-shared-with-deps-1.10.0-cu113.zip"; - url = "https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcu113.zip"; - hash = "sha256-jPylK4j0V8SEQ8cZU+O22P7kQ28wanIB0GkBzRGyTj8="; - }; - }; - "1.12.1" = { - x86_64-darwin-cpu = { - name = "libtorch-macos-1.12.1.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.12.1.zip"; - hash = "sha256-HSisxHs466c6XwvZEbkV/1kVNBzJOy3uVw9Bh497Vk8="; - }; - x86_64-linux-cpu = { - name = "libtorch-cxx11-abi-shared-with-deps-1.12.1-cpu.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcpu.zip"; - hash = "sha256-bHhC0WTli9vDJv56TaT6iA/d8im9zRkK1TlBuqkh4Wg="; - }; - x86_64-linux-cuda = { - name = "libtorch-cxx11-abi-shared-with-deps-1.12.1-cu116.zip"; - url = "https://download.pytorch.org/libtorch/cu116/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcu116.zip"; - hash = "sha256-YRcusDhrHYwIFOzt7vOuUlc11VyEUjIcBzjWEyi/874="; + name = "libtorch-cxx11-abi-shared-with-deps-1.13.1-cu116.zip"; + url = "https://download.pytorch.org/libtorch/cu116/libtorch-cxx11-abi-shared-with-deps-1.13.1%2Bcu116.zip"; + hash = "sha256-CujIDlE9VqUuhSJcvUO6IlDWjmjEt54sMAJ4ZRjuziw="; }; }; } diff --git a/pkgs/development/libraries/science/math/libtorch/prefetch.sh b/pkgs/development/libraries/science/math/libtorch/prefetch.sh index 26b24198e235..5c6d60ae8b20 100755 --- a/pkgs/development/libraries/science/math/libtorch/prefetch.sh +++ b/pkgs/development/libraries/science/math/libtorch/prefetch.sh @@ -6,7 +6,7 @@ set -eou pipefail version=$1 bucket="https://download.pytorch.org/libtorch" -CUDA_VERSION=cu113 +CUDA_VERSION=cu116 url_and_key_list=( "x86_64-darwin-cpu $bucket/cpu/libtorch-macos-${version}.zip libtorch-macos-${version}.zip"