From 0d93b571dca7808a68b094524ad578ece24e217b Mon Sep 17 00:00:00 2001 From: Povl Filip Sonne-Frederiksen <22501790+pfmephisto@users.noreply.github.com> Date: Tue, 28 Oct 2025 08:13:28 +0100 Subject: [PATCH] libtorch-bin: 2.5.0 -> 2.9.0 Signed-off-by: Povl Filip Sonne-Frederiksen <22501790+pfmephisto@users.noreply.github.com> --- .../libraries/science/math/libtorch/bin.nix | 2 +- .../science/math/libtorch/binary-hashes.nix | 20 +++++++++---------- .../science/math/libtorch/prefetch.sh | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 3f0168644a18..89f829636315 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -20,7 +20,7 @@ let # this derivation. However, we should ensure on version bumps # that the CUDA toolkit for `passthru.tests` is still # up-to-date. - version = "2.5.0"; + version = "2.9.0"; 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 9d6e860e3d0b..94b37ea729a6 100644 --- a/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix +++ b/pkgs/development/libraries/science/math/libtorch/binary-hashes.nix @@ -1,20 +1,20 @@ version: builtins.getAttr version { - "2.5.0" = { + "2.9.0" = { aarch64-darwin-cpu = { - name = "libtorch-macos-arm64-2.5.0.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.5.0.zip"; - hash = "sha256-4d9YKUuvAESBeG/WCUsQfEHwdB2z34grnlwWslj4970="; + name = "libtorch-macos-arm64-2.9.0.zip"; + url = "https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.9.0.zip"; + hash = "sha256-inwzvGPPKK6KVBoMijpXVKV+V3QcmQbBhYdFlZbZ/ho="; }; x86_64-linux-cpu = { - name = "libtorch-cxx11-abi-shared-with-deps-2.5.0-cpu.zip"; - url = "https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.5.0%2Bcpu.zip"; - hash = "sha256-gUzPhc4Z8rTPhIm89pPoLP0Ww17ono+/xgMW46E/Tro="; + name = "libtorch-shared-with-deps-2.9.0-cpu.zip"; + url = "https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.9.0%2Bcpu.zip"; + hash = "sha256-GrfTahXLCOeMQD07+yEU4K6WCbmQMjv0GXc+EMS95e0="; }; x86_64-linux-cuda = { - name = "libtorch-cxx11-abi-shared-with-deps-2.5.0-cu124.zip"; - url = "https://download.pytorch.org/libtorch/cu124/libtorch-cxx11-abi-shared-with-deps-2.5.0%2Bcu124.zip"; - hash = "sha256-UaX47GAwyZ6UmzgY85TeAHmy3u52pBHhiyM5NAz7ens="; + name = "libtorch-shared-with-deps-2.9.0-cu130.zip"; + url = "https://download.pytorch.org/libtorch/cu130/libtorch-shared-with-deps-2.9.0%2Bcu130.zip"; + hash = "sha256-u8l7JIy2rdk6nxv6UxNmFcfOVcpjvZnIEr5CczVNRDQ="; }; }; } diff --git a/pkgs/development/libraries/science/math/libtorch/prefetch.sh b/pkgs/development/libraries/science/math/libtorch/prefetch.sh index 4ae96be7aa75..9b64e2541396 100755 --- a/pkgs/development/libraries/science/math/libtorch/prefetch.sh +++ b/pkgs/development/libraries/science/math/libtorch/prefetch.sh @@ -6,12 +6,12 @@ set -eou pipefail version=$1 bucket="https://download.pytorch.org/libtorch" -CUDA_VERSION=cu124 +CUDA_VERSION=cu130 url_and_key_list=( "aarch64-darwin-cpu $bucket/cpu/libtorch-macos-arm64-${version}.zip libtorch-macos-arm64-${version}.zip" - "x86_64-linux-cpu $bucket/cpu/libtorch-cxx11-abi-shared-with-deps-${version}%2Bcpu.zip libtorch-cxx11-abi-shared-with-deps-${version}-cpu.zip" - "x86_64-linux-cuda $bucket/${CUDA_VERSION}/libtorch-cxx11-abi-shared-with-deps-${version}%2B${CUDA_VERSION}.zip libtorch-cxx11-abi-shared-with-deps-${version}-${CUDA_VERSION}.zip" + "x86_64-linux-cpu $bucket/cpu/libtorch-shared-with-deps-${version}%2Bcpu.zip libtorch-shared-with-deps-${version}-cpu.zip" + "x86_64-linux-cuda $bucket/${CUDA_VERSION}/libtorch-shared-with-deps-${version}%2B${CUDA_VERSION}.zip libtorch-shared-with-deps-${version}-${CUDA_VERSION}.zip" ) hashfile="binary-hashes-$version.nix" @@ -23,7 +23,7 @@ for url_and_key in "${url_and_key_list[@]}"; do name=$(echo "$url_and_key" | cut -d' ' -f3) echo "prefetching ${url}..." - hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --unpack "$url" --name "$name")) + hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack "$url" --name "$name")) echo " $key = {" >> $hashfile echo " name = \"$name\";" >> $hashfile