libtorch-bin: 2.5.0 -> 2.9.0 (#456389)

This commit is contained in:
Fabián Heredia Montiel
2025-11-12 15:53:07 +00:00
committed by GitHub
3 changed files with 15 additions and 15 deletions
@@ -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";
@@ -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=";
};
};
}
@@ -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