Merge pull request #259068 from GaetanLepage/pytorch

python3Packages.{torch,torch-bin}: 2.0.1 -> 2.1.1
This commit is contained in:
Connor Baker 2023-11-30 22:37:15 -05:00 committed by GitHub
commit f4cc0777fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 278 additions and 180 deletions

View file

@ -38,13 +38,13 @@ final: prev: let
+ ".tar.gz";
tensorRTVersions = {
"8.6.0" = [
"8.6.1" = [
rec {
fileVersionCuda = "11.8";
fullVersion = "8.6.0.12";
sha256 = "sha256-wXMqEJPFerefoLaH8GG+Np5EnJwXeStmDzZj7Nj6e2M=";
fileVersionCuda = "12.0";
fullVersion = "8.6.1.6";
sha256 = "sha256-D4FXpfxTKZQ7M4uJNZE3M1CvqQyoEjnNrddYDNHrolQ=";
tarball = tarballURL { inherit fileVersionCuda fullVersion; };
supportedCudaVersions = [ "11.0" "11.1" "11.2" "11.3" "11.4" "11.5" "11.6" "11.7" "11.8" ];
supportedCudaVersions = [ "12.0" "12.1" ];
}
];
"8.5.3" = [
@ -133,6 +133,8 @@ final: prev: let
"11.6" = "8.4.0";
"11.7" = "8.5.3";
"11.8" = "8.5.3";
"12.0" = "8.6.1";
"12.1" = "8.6.1";
}.${cudaVersion} or "8.4.0";
in tensorRTPackages

View file

@ -9,7 +9,6 @@
, future
, numpy
, autoPatchelfHook
, patchelf
, pyyaml
, requests
, setuptools
@ -25,7 +24,7 @@ let
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
srcs = import ./binary-hashes.nix version;
unsupported = throw "Unsupported system";
version = "2.0.1";
version = "2.1.1";
in buildPythonPackage {
inherit version;

View file

@ -6,86 +6,86 @@
# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows.
version : builtins.getAttr version {
"2.0.1" = {
"2.1.1" = {
x86_64-linux-38 = {
name = "torch-2.0.1-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp38-cp38-linux_x86_64.whl";
hash = "sha256-LOOKbk6nxLf1uqUeZSQ6X2h/bhmreRW6WypDEQX1C74=";
name = "torch-2.1.1-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
hash = "sha256-h8y2g+ZCqYuO8FRV722GRntiB1pDJfTV+aouiTL2Bzk=";
};
x86_64-linux-39 = {
name = "torch-2.0.1-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp39-cp39-linux_x86_64.whl";
hash = "sha256-61XynbV0TtqKlvVZTmN9rtDVIngnMAXedZlw5nz6alo=";
name = "torch-2.1.1-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
hash = "sha256-KCRfYtEHPCfW8N4DqBrUnVMzxGBlke2I/tHtuX8FUz0=";
};
x86_64-linux-310 = {
name = "torch-2.0.1-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl";
hash = "sha256-p6SdRZv0hi9k97waaL7M+IgcL6nz4FaWCOFrpvhev3s=";
name = "torch-2.1.1-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
hash = "sha256-7HbRE1DI6IejTTZgLNN/UGObyc2p+upNQ/IHDpeS5KQ=";
};
x86_64-linux-311 = {
name = "torch-2.0.1-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp311-cp311-linux_x86_64.whl";
hash = "sha256-FDtsZYwX1DN24t+6osEG01Y51hXl6N7EQpzx5RDdjWE=";
name = "torch-2.1.1-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
hash = "sha256-g7/hE036irhlU8Fdpd/6GQqG2CKvr+jqbeEWnBDZcao=";
};
x86_64-darwin-38 = {
name = "torch-2.0.1-cp38-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp38-none-macosx_10_9_x86_64.whl";
hash = "sha256-Gttg02nyZQysjpqVsdV1jiXVJqNICPdEjQvVmeSukHI=";
name = "torch-2.1.1-cp38-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp38-none-macosx_10_9_x86_64.whl";
hash = "sha256-1WsDIXZFjir0cJYnu9LCD+KRfv+M0Ien/jE6zM9c4vE=";
};
x86_64-darwin-39 = {
name = "torch-2.0.1-cp39-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp39-none-macosx_10_9_x86_64.whl";
hash = "sha256-xi35k1K9buWlqNGDJFIRBDXReLUWTeRQgxo6jMFNxoA=";
name = "torch-2.1.1-cp39-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp39-none-macosx_10_9_x86_64.whl";
hash = "sha256-cVtQ2MHeXaVSSmgofrAA9z4CbnTV9rErxFDvaZX89fk=";
};
x86_64-darwin-310 = {
name = "torch-2.0.1-cp310-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp310-none-macosx_10_9_x86_64.whl";
hash = "sha256-Vn+E1lftxVgtcWkAVD5uYjU9videYc3DbtpJKeRt+ec=";
name = "torch-2.1.1-cp310-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp310-none-macosx_10_9_x86_64.whl";
hash = "sha256-Hh5frd1DqPLA4OIr6s0eI1ouRHeU2AdIPJSp4xtUp1g=";
};
x86_64-darwin-311 = {
name = "torch-2.0.1-cp311-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp311-none-macosx_10_9_x86_64.whl";
hash = "sha256-72VEJ9kWABKYZGRONd7qdh+x/hMXEBgLlSpvLiIHB14=";
name = "torch-2.1.1-cp311-none-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp311-none-macosx_10_9_x86_64.whl";
hash = "sha256-pwWTgG8dfmtTZX2WgQUY2g+I7yYIyYpAKVV2W4x51Sw=";
};
aarch64-darwin-38 = {
name = "torch-2.0.1-cp38-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp38-none-macosx_11_0_arm64.whl";
hash = "sha256-G8/8FrieKWgmszuY21Fm+ZDjtyZUorkGc+gXsWxQ4ys=";
name = "torch-2.1.1-cp38-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp38-none-macosx_11_0_arm64.whl";
hash = "sha256-KeO5CowoH2ZggEqTnR9CGGBMgBYuUh4ebYyFVzJZAqA=";
};
aarch64-darwin-39 = {
name = "torch-2.0.1-cp39-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp39-none-macosx_11_0_arm64.whl";
hash = "sha256-ZxolZeP2O4/o5Crj42rSSf5eVnQ16ie5TtqmcqfQxBY=";
name = "torch-2.1.1-cp39-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp39-none-macosx_11_0_arm64.whl";
hash = "sha256-22foclx29Mf08C51UbsW6BuhoZEoZ7w117uW0r6MeLQ=";
};
aarch64-darwin-310 = {
name = "torch-2.0.1-cp310-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp310-none-macosx_11_0_arm64.whl";
hash = "sha256-eHtaeKp5F0Zem5Y5m4g5IMiKCPTrY7Wl0tGhbifS+Js=";
name = "torch-2.1.1-cp310-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp310-none-macosx_11_0_arm64.whl";
hash = "sha256-52vzxcNUh08dpGXIUqL7YO5svOMG6TUzeIV2DwgPm6o=";
};
aarch64-darwin-311 = {
name = "torch-2.0.1-cp311-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp311-none-macosx_11_0_arm64.whl";
hash = "sha256-JapDyoDc3zLxPaBMUD7Hr9+Od+OgGD3YXNPlOyhC5Sc=";
name = "torch-2.1.1-cp311-none-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp311-none-macosx_11_0_arm64.whl";
hash = "sha256-4xL36C5JVl92Z7C7+VWasMWXBj2TBEdAeBwCrNWoeXg=";
};
aarch64-linux-38 = {
name = "torch-2.0.1-cp38-cp38-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torch-2.0.1-cp38-cp38-manylinux2014_aarch64.whl";
hash = "sha256-CIIkN1X/KIlejm3GvCbrz1qgkR7YGyoS8kH8SwkHWxM=";
name = "torch-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
hash = "sha256-nKD8vz1bpkTWqFcsg6mrvfX3/1dbw4Up72wYWjpxvek=";
};
aarch64-linux-39 = {
name = "torch-2.0.1-cp39-cp39-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torch-2.0.1-cp39-cp39-manylinux2014_aarch64.whl";
hash = "sha256-Qj4K4le3VrtFpLSQcgRnctGtDFkiZcUIAHDgdn2k5JA=";
name = "torch-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
hash = "sha256-sxIwvQWEJOVtun+JkoDbxqyLmUjkOQLgyEpEZmsewVE=";
};
aarch64-linux-310 = {
name = "torch-2.0.1-cp310-cp310-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torch-2.0.1-cp310-cp310-manylinux2014_aarch64.whl";
hash = "sha256-NZv6rZTRzaAqt3XcHMOG1YVxIym7R7h0FgfvbvSVB0c=";
name = "torch-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
hash = "sha256-hP79YzVkFsDNIFeGN8zbuCFkmTQA7Re1fJUd1jdtzug=";
};
aarch64-linux-311 = {
name = "torch-2.0.1-cp311-cp311-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torch-2.0.1-cp311-cp311-manylinux2014_aarch64.whl";
hash = "sha256-tgGbHeSXjpbaoh1qPrtB6IoLR0iY/iUf2WGJWHQIhz4=";
name = "torch-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/cpu/torch-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl";
hash = "sha256-YbUbM8YXN8KHBYsMMGHmqdPDY4Y+SglPgEvEhoiKGIo=";
};
};
}

View file

@ -20,6 +20,7 @@
Accelerate, CoreServices, libobjc,
# Propagated build inputs
fsspec,
filelock,
jinja2,
networkx,
@ -127,7 +128,7 @@ let
in buildPythonPackage rec {
pname = "torch";
# Don't forget to update torch-bin to the same version.
version = "2.0.1";
version = "2.1.1";
format = "setuptools";
disabled = pythonOlder "3.8.0";
@ -143,10 +144,13 @@ in buildPythonPackage rec {
repo = "pytorch";
rev = "refs/tags/v${version}";
fetchSubmodules = true;
hash = "sha256-xUj77yKz3IQ3gd/G32pI4OhL3LoN1zS7eFg0/0nZp5I=";
hash = "sha256-01+uqHvPbQVXKLohGWfsCsZOjb7xmfjBKkTGUGMEdAI=";
};
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
patches = lib.optionals cudaSupport [
./fix-cmake-cuda-toolkit.patch
]
++ 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
@ -188,12 +192,11 @@ in buildPythonPackage rec {
'message(FATAL_ERROR "Found NCCL header version and library version' \
'message(WARNING "Found NCCL header version and library version'
''
# TODO(@connorbaker): Remove this patch after 2.1.0 lands.
# Remove PyTorch's FindCUDAToolkit.cmake and to use CMake's default.
# We do not remove the entirety of cmake/Modules_CUDA_fix because we need FindCUDNN.cmake.
+ lib.optionalString cudaSupport ''
substituteInPlace torch/utils/cpp_extension.py \
--replace \
"'8.6', '8.9'" \
"'8.6', '8.7', '8.9'"
rm cmake/Modules/FindCUDAToolkit.cmake
rm -rf cmake/Modules_CUDA_fix/{upstream,FindCUDA.cmake}
''
# error: no member named 'aligned_alloc' in the global namespace; did you mean simply 'aligned_alloc'
# This lib overrided aligned_alloc hence the error message. Tltr: his function is linkable but not in header.
@ -377,6 +380,7 @@ in buildPythonPackage rec {
pyyaml
# From install_requires:
fsspec
filelock
typing-extensions
sympy

View file

@ -0,0 +1,65 @@
From aa7e7cfd5a5fe0c839406c1b197b81ef955a7ef5 Mon Sep 17 00:00:00 2001
From: Gaetan Lepage <gaetan@glepage.com>
Date: Thu, 23 Nov 2023 00:39:26 +0100
Subject: [PATCH] fix-cmake-cuda-toolkit
---
CMakeLists.txt | 4 ----
cmake/public/cuda.cmake | 12 +++++++++---
tools/setup_helpers/cmake.py | 2 ++
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a48eaf4e29..3aaeef2593a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1152,10 +1152,6 @@ if(BUILD_SHARED_LIBS)
${PROJECT_SOURCE_DIR}/cmake/Modules_CUDA_fix
DESTINATION share/cmake/Caffe2/
COMPONENT dev)
- install(FILES
- ${PROJECT_SOURCE_DIR}/cmake/Modules/FindCUDAToolkit.cmake
- DESTINATION share/cmake/Caffe2/
- COMPONENT dev)
install(FILES
${PROJECT_SOURCE_DIR}/cmake/Modules/FindCUSPARSELT.cmake
DESTINATION share/cmake/Caffe2/
diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake
index 32f3ba375b5..c8b666e4c78 100644
--- a/cmake/public/cuda.cmake
+++ b/cmake/public/cuda.cmake
@@ -62,9 +62,15 @@ cmake_policy(POP)
if(NOT CMAKE_CUDA_COMPILER_VERSION STREQUAL CUDAToolkit_VERSION OR
NOT CUDA_INCLUDE_DIRS STREQUAL CUDAToolkit_INCLUDE_DIR)
- message(FATAL_ERROR "Found two conflicting CUDA installs:\n"
- "V${CMAKE_CUDA_COMPILER_VERSION} in '${CUDA_INCLUDE_DIRS}' and\n"
- "V${CUDAToolkit_VERSION} in '${CUDAToolkit_INCLUDE_DIR}'")
+ if(CUDA_INCLUDE_DIRS IN_LIST CUDAToolkit_INCLUDE_DIR)
+ message(STATUS "CUDA_INCLUDE_DIRS is a substring of CUDAToolkit_INCLUDE_DIR. "
+ "Setting CUDA_INCLUDE_DIRS to CUDAToolkit_INCLUDE_DIR.")
+ set(CUDA_INCLUDE_DIRS "${CUDAToolkit_INCLUDE_DIR}")
+ else()
+ message(FATAL_ERROR "Found two conflicting CUDA installs:\n"
+ "V${CMAKE_CUDA_COMPILER_VERSION} in '${CUDA_INCLUDE_DIRS}' and\n"
+ "V${CUDAToolkit_VERSION} in '${CUDAToolkit_INCLUDE_DIR}'")
+ endif()
endif()
if(NOT TARGET CUDA::nvToolsExt)
diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py
index fb19b66dfba..3f83bef32fe 100644
--- a/tools/setup_helpers/cmake.py
+++ b/tools/setup_helpers/cmake.py
@@ -207,6 +207,8 @@ class CMake:
"BUILDING_WITH_TORCH_LIBS",
"CUDA_HOST_COMPILER",
"CUDA_NVCC_EXECUTABLE",
+ "CUDAToolkit_ROOT",
+ "CUDAToolkit_INCLUDE_DIR",
"CUDA_SEPARABLE_COMPILATION",
"CUDNN_LIBRARY",
"CUDNN_INCLUDE_DIR",
--
2.42.0

View file

@ -5,9 +5,9 @@ set -eou pipefail
version=$1
linux_cuda_version="cu118"
linux_cuda_version="cu121"
linux_cuda_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
linux_cpu_bucket="https://download.pytorch.org/whl"
linux_cpu_bucket="https://download.pytorch.org/whl/cpu"
darwin_bucket="https://download.pytorch.org/whl/cpu"
url_and_key_list=(
@ -23,10 +23,10 @@ url_and_key_list=(
"aarch64-darwin-39 $darwin_bucket/torch-${version}-cp39-none-macosx_11_0_arm64.whl torch-${version}-cp39-none-macosx_11_0_arm64.whl"
"aarch64-darwin-310 $darwin_bucket/torch-${version}-cp310-none-macosx_11_0_arm64.whl torch-${version}-cp310-none-macosx_11_0_arm64.whl"
"aarch64-darwin-311 $darwin_bucket/torch-${version}-cp311-none-macosx_11_0_arm64.whl torch-${version}-cp311-none-macosx_11_0_arm64.whl"
"aarch64-linux-38 $linux_cpu_bucket/torch-${version}-cp38-cp38-manylinux2014_aarch64.whl torch-${version}-cp38-cp38-manylinux2014_aarch64.whl"
"aarch64-linux-39 $linux_cpu_bucket/torch-${version}-cp39-cp39-manylinux2014_aarch64.whl torch-${version}-cp39-cp39-manylinux2014_aarch64.whl"
"aarch64-linux-310 $linux_cpu_bucket/torch-${version}-cp310-cp310-manylinux2014_aarch64.whl torch-${version}-cp310-cp310-manylinux2014_aarch64.whl"
"aarch64-linux-311 $linux_cpu_bucket/torch-${version}-cp311-cp311-manylinux2014_aarch64.whl torch-${version}-cp311-cp311-manylinux2014_aarch64.whl"
"aarch64-linux-38 $linux_cpu_bucket/torch-${version}-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
"aarch64-linux-39 $linux_cpu_bucket/torch-${version}-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
"aarch64-linux-310 $linux_cpu_bucket/torch-${version}-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
"aarch64-linux-311 $linux_cpu_bucket/torch-${version}-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl torch-${version}-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
)
hashfile="binary-hashes-$version.nix"

View file

@ -6,6 +6,9 @@
, cudaPackages
, fetchurl
, ffmpeg_4
, ffmpeg_5
, ffmpeg_6
, sox
, pythonAtLeast
, pythonOlder
, python
@ -14,7 +17,7 @@
buildPythonPackage rec {
pname = "torchaudio";
version = "2.0.2";
version = "2.1.1";
format = "wheel";
src =
@ -35,7 +38,11 @@ buildPythonPackage rec {
# libnvToolsExt-$hash.so.1
cuda_nvtx
ffmpeg_4.lib
# We need to patch the lib/_torchaudio_ffmpeg[4-6]
ffmpeg_4.dev
ffmpeg_5.dev
ffmpeg_6.dev
sox
];
nativeBuildInputs = [

View file

@ -6,86 +6,86 @@
# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows.
version : builtins.getAttr version {
"2.0.2" = {
"2.1.1" = {
x86_64-linux-38 = {
name = "torchaudio-2.0.2-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchaudio-2.0.2%2Bcu118-cp38-cp38-linux_x86_64.whl";
hash = "sha256-lU3njk8Gb+lvpvQYtfHX1Y0bD7z2otNzDwQaL9eW93I=";
name = "torchaudio-2.1.1-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.1.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
hash = "sha256-GM8TlEbiLP2K+jglzkkvPPEf00LxcI7o9K+EtIKLTGA=";
};
x86_64-linux-39 = {
name = "torchaudio-2.0.2-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchaudio-2.0.2%2Bcu118-cp39-cp39-linux_x86_64.whl";
hash = "sha256-MixBw26OYv03qzURSmeSGuVCvNlA1YPNE+DhUUHISPk=";
name = "torchaudio-2.1.1-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.1.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
hash = "sha256-4YdH1mdew+TFmvpA23Lp5+pNcVy5KxQ9pV31lhPAPTA=";
};
x86_64-linux-310 = {
name = "torchaudio-2.0.2-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchaudio-2.0.2%2Bcu118-cp310-cp310-linux_x86_64.whl";
hash = "sha256-JmkmReoGGgBcV+xYGi0EJSEKxrqfkj7fEcybDvOhEek=";
name = "torchaudio-2.1.1-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.1.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
hash = "sha256-7/gmDgL4imlKlksrtvY3pq8xB3h9kH6uflgBgWAzv6c=";
};
x86_64-linux-311 = {
name = "torchaudio-2.0.2-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchaudio-2.0.2%2Bcu118-cp311-cp311-linux_x86_64.whl";
hash = "sha256-e8C1Cg2DokvcORYnDCOTQ0WshDUd92vTuwiDS9snHfY=";
name = "torchaudio-2.1.1-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchaudio-2.1.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
hash = "sha256-qq2dkQ5CDBlVsIpa8yatlplLitDQWW/L9gGxVYDof6c=";
};
x86_64-darwin-38 = {
name = "torchaudio-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp38-cp38-macosx_10_9_x86_64.whl";
hash = "sha256-qCg91hxXnqWxTWdzu8C/hFc7ErN/BfArtLJCXXd2coQ=";
name = "torchaudio-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp38-cp38-macosx_10_13_x86_64.whl";
hash = "sha256-b8d8SNB5zSbvQMYTqm8xxcePD4FiEWYqJ4Vsf1RPHMw=";
};
x86_64-darwin-39 = {
name = "torchaudio-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp39-cp39-macosx_10_9_x86_64.whl";
hash = "sha256-ETihw52iRFocrKIN3OHnfJZX6SJj6zQ3YCT1F/UoTUs=";
name = "torchaudio-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp39-cp39-macosx_10_13_x86_64.whl";
hash = "sha256-f/BYndc9vepm7SHIF8ttHvjs0+6EmXrqf8DjUroWjkg=";
};
x86_64-darwin-310 = {
name = "torchaudio-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl";
hash = "sha256-gMZNq7nYwzvG8qjgx+vhfqh/UCiTHA1qL3O54WtSctA=";
name = "torchaudio-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp310-cp310-macosx_10_13_x86_64.whl";
hash = "sha256-JPpYcPYgmU5FiEUtVO3LL/tfUJ1+42ugToxo6yiv/Io=";
};
x86_64-darwin-311 = {
name = "torchaudio-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl";
hash = "sha256-psuoDZqzouwTF83Fy8BlShiaJuPYso75+DM2FZ/V5ek=";
name = "torchaudio-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp311-cp311-macosx_10_13_x86_64.whl";
hash = "sha256-7j9/B9sCOprjYGpjDbRyJ+d/IOYEyZQGdnzsWKE5uW4=";
};
aarch64-darwin-38 = {
name = "torchaudio-2.0.2-cp38-cp38-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp38-cp38-macosx_11_0_arm64.whl";
hash = "sha256-KMm+gwYI+TyQZ3Dre0iAli+P75vVJ1rFtIyFDzzEvDI=";
name = "torchaudio-2.1.1-cp38-cp38-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp38-cp38-macosx_11_0_arm64.whl";
hash = "sha256-L+SgvGuooE9xrLxmT93CtzY3y/G+NFxkM0KprtNDVDo=";
};
aarch64-darwin-39 = {
name = "torchaudio-2.0.2-cp39-cp39-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp39-cp39-macosx_11_0_arm64.whl";
hash = "sha256-3l2Uy4MFwAJo37xXbKfkRfQIkeAkqeXijGOtn4UeVBo=";
name = "torchaudio-2.1.1-cp39-cp39-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp39-cp39-macosx_11_0_arm64.whl";
hash = "sha256-VwmUP7JnXIVDvrYfAz+50AGr8VXxUJrzPhO8uD9UPQo=";
};
aarch64-darwin-310 = {
name = "torchaudio-2.0.2-cp310-cp310-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp310-cp310-macosx_11_0_arm64.whl";
hash = "sha256-FhlnNQD+CK6WtxlS8D7Px059CEPNmIIZPQZCqCck9Tc=";
name = "torchaudio-2.1.1-cp310-cp310-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp310-cp310-macosx_11_0_arm64.whl";
hash = "sha256-fNRlvgb9OHNq2n1MCG8M3SSd4ot1ddEDXOJd+ziW+kw=";
};
aarch64-darwin-311 = {
name = "torchaudio-2.0.2-cp311-cp311-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.0.2-cp311-cp311-macosx_11_0_arm64.whl";
hash = "sha256-FTJxMrKPNJY7qm/hgTAwpjTSWBqpyhIPcwwej6vcEQI=";
name = "torchaudio-2.1.1-cp311-cp311-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchaudio-2.1.1-cp311-cp311-macosx_11_0_arm64.whl";
hash = "sha256-+tHGDPveoxu7KgDk0fFTYEYG3N00vJdPQ8YvpuJpYns=";
};
aarch64-linux-38 = {
name = "torchaudio-2.0.2-cp38-cp38-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.0.2-cp38-cp38-manylinux2014_aarch64.whl";
hash = "sha256-7gjsMDBQQFmY50oKNkmu5NFkCMLrS7H4x6cmMYsc4bc=";
name = "torchaudio-2.1.1-cp38-cp38-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.1.1-cp38-cp38-linux_aarch64.whl";
hash = "sha256-bnhAF5QfPoGtvvJGIkqT1eXSZocF3NxFlWZo3nuiLTI=";
};
aarch64-linux-39 = {
name = "torchaudio-2.0.2-cp39-cp39-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.0.2-cp39-cp39-manylinux2014_aarch64.whl";
hash = "sha256-p08z2gs8U7dw9YOgLKvVkZbwift3pl6znNXYEbWiHWM=";
name = "torchaudio-2.1.1-cp39-cp39-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.1.1-cp39-cp39-linux_aarch64.whl";
hash = "sha256-FXE1qdeNwSe7J0XEZUqn6hQd3Huzn8rSHf+Oq6VXihQ=";
};
aarch64-linux-310 = {
name = "torchaudio-2.0.2-cp310-cp310-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.0.2-cp310-cp310-manylinux2014_aarch64.whl";
hash = "sha256-2t8je0/RVaPSE73+/+3tR/WlU9ODgXUAQ4tE8k+lOFE=";
name = "torchaudio-2.1.1-cp310-cp310-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.1.1-cp310-cp310-linux_aarch64.whl";
hash = "sha256-dK3UoOX6BJmO1SoBN9Ox2cKtJdqCEsRt8O1z+h0Uanc=";
};
aarch64-linux-311 = {
name = "torchaudio-2.0.2-cp311-cp311-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.0.2-cp311-cp311-manylinux2014_aarch64.whl";
hash = "sha256-sirOqh7FozEMwVZC0Z3QDVOnzjmbkJatHeoLJOUJevM=";
name = "torchaudio-2.1.1-cp311-cp311-manylinux2014_aarch64.whl";
url = "https://download.pytorch.org/whl/torchaudio-2.1.1-cp311-cp311-linux_aarch64.whl";
hash = "sha256-6toEKY1TfF0CddoRIsRxmMF31CYetaXSI24Rqg6FyB8=";
};
};
}

View file

@ -2,9 +2,12 @@
, buildPythonPackage
, fetchFromGitHub
, cmake
, symlinkJoin
, ffmpeg-full
, pkg-config
, ninja
, pybind11
, sox
, torch
, cudaSupport ? torch.cudaSupport
, cudaPackages
@ -12,13 +15,13 @@
buildPythonPackage rec {
pname = "torchaudio";
version = "2.0.2";
version = "2.1.1";
src = fetchFromGitHub {
owner = "pytorch";
repo = "audio";
rev = "v${version}";
hash = "sha256-9lB4gLXq0nXHT1+DNOlbJQqNndt2I6kVoNwhMO/2qlE=";
rev = "refs/tags/v${version}";
hash = "sha256-5UlnOGXXFu1p9M5B+Ixc9DW5hLZ1nskv81Y+McbWu6Q=";
};
postPatch = ''
@ -31,6 +34,16 @@ buildPythonPackage rec {
TORCH_CUDA_ARCH_LIST = "${lib.concatStringsSep ";" torch.cudaCapabilities}";
};
# https://github.com/pytorch/audio/blob/v2.1.0/docs/source/build.linux.rst#optional-build-torchaudio-with-a-custom-built-ffmpeg
FFMPEG_ROOT = symlinkJoin {
name = "ffmpeg";
paths = [
ffmpeg-full.bin
ffmpeg-full.dev
ffmpeg-full.lib
];
};
nativeBuildInputs = [
cmake
pkg-config
@ -38,8 +51,11 @@ buildPythonPackage rec {
] ++ lib.optionals cudaSupport [
cudaPackages.cuda_nvcc
];
buildInputs = [
ffmpeg-full
pybind11
sox
] ++ lib.optionals cudaSupport [
cudaPackages.libcurand.dev
cudaPackages.libcurand.lib
@ -52,6 +68,7 @@ buildPythonPackage rec {
cudaPackages.libcufft.dev
cudaPackages.libcufft.lib
];
propagatedBuildInputs = [
torch
];

View file

@ -5,7 +5,7 @@ set -eou pipefail
version=$1
linux_cuda_version="cu118"
linux_cuda_version="cu121"
linux_cuda_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
linux_cpu_bucket="https://download.pytorch.org/whl"
darwin_bucket="https://download.pytorch.org/whl/cpu"
@ -15,18 +15,18 @@ url_and_key_list=(
"x86_64-linux-39 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchaudio-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-310 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchaudio-${version}-cp310-cp310-linux_x86_64.whl"
"x86_64-linux-311 $linux_cuda_bucket/torchaudio-${version}%2B${linux_cuda_version}-cp311-cp311-linux_x86_64.whl torchaudio-${version}-cp311-cp311-linux_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_10_9_x86_64.whl torchaudio-${version}-cp38-cp38-macosx_10_9_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_10_9_x86_64.whl torchaudio-${version}-cp39-cp39-macosx_10_9_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_10_9_x86_64.whl torchaudio-${version}-cp310-cp310-macosx_10_9_x86_64.whl"
"x86_64-darwin-311 $darwin_bucket/torchaudio-${version}-cp311-cp311-macosx_10_9_x86_64.whl torchaudio-${version}-cp311-cp311-macosx_10_9_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_10_13_x86_64.whl torchaudio-${version}-cp38-cp38-macosx_10_9_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_10_13_x86_64.whl torchaudio-${version}-cp39-cp39-macosx_10_9_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_10_13_x86_64.whl torchaudio-${version}-cp310-cp310-macosx_10_9_x86_64.whl"
"x86_64-darwin-311 $darwin_bucket/torchaudio-${version}-cp311-cp311-macosx_10_13_x86_64.whl torchaudio-${version}-cp311-cp311-macosx_10_9_x86_64.whl"
"aarch64-darwin-38 $darwin_bucket/torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl torchaudio-${version}-cp38-cp38-macosx_11_0_arm64.whl"
"aarch64-darwin-39 $darwin_bucket/torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl torchaudio-${version}-cp39-cp39-macosx_11_0_arm64.whl"
"aarch64-darwin-310 $darwin_bucket/torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl torchaudio-${version}-cp310-cp310-macosx_11_0_arm64.whl"
"aarch64-darwin-311 $darwin_bucket/torchaudio-${version}-cp311-cp311-macosx_11_0_arm64.whl torchaudio-${version}-cp311-cp311-macosx_11_0_arm64.whl"
"aarch64-linux-38 $linux_cpu_bucket/torchaudio-${version}-cp38-cp38-manylinux2014_aarch64.whl torchaudio-${version}-cp38-cp38-manylinux2014_aarch64.whl"
"aarch64-linux-39 $linux_cpu_bucket/torchaudio-${version}-cp39-cp39-manylinux2014_aarch64.whl torchaudio-${version}-cp39-cp39-manylinux2014_aarch64.whl"
"aarch64-linux-310 $linux_cpu_bucket/torchaudio-${version}-cp310-cp310-manylinux2014_aarch64.whl torchaudio-${version}-cp310-cp310-manylinux2014_aarch64.whl"
"aarch64-linux-311 $linux_cpu_bucket/torchaudio-${version}-cp311-cp311-manylinux2014_aarch64.whl torchaudio-${version}-cp311-cp311-manylinux2014_aarch64.whl"
"aarch64-linux-38 $linux_cpu_bucket/torchaudio-${version}-cp38-cp38-linux_aarch64.whl torchaudio-${version}-cp38-cp38-manylinux2014_aarch64.whl"
"aarch64-linux-39 $linux_cpu_bucket/torchaudio-${version}-cp39-cp39-linux_aarch64.whl torchaudio-${version}-cp39-cp39-manylinux2014_aarch64.whl"
"aarch64-linux-310 $linux_cpu_bucket/torchaudio-${version}-cp310-cp310-linux_aarch64.whl torchaudio-${version}-cp310-cp310-manylinux2014_aarch64.whl"
"aarch64-linux-311 $linux_cpu_bucket/torchaudio-${version}-cp311-cp311-linux_aarch64.whl torchaudio-${version}-cp311-cp311-manylinux2014_aarch64.whl"
)
hashfile=binary-hashes-"$version".nix

View file

@ -16,7 +16,7 @@ let
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
srcs = import ./binary-hashes.nix version;
unsupported = throw "Unsupported system";
version = "0.15.2";
version = "0.16.1";
in buildPythonPackage {
inherit version;

View file

@ -6,66 +6,66 @@
# To add a new version, run "prefetch.sh 'new-version'" to paste the generated file as follows.
version : builtins.getAttr version {
"0.15.2" = {
"0.16.1" = {
x86_64-linux-38 = {
name = "torchvision-0.15.2-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp38-cp38-linux_x86_64.whl";
hash = "sha256-r2gH1eWZ/lOByRYjWlWBQH6FDrd8PUOJnzehUR/4HMA=";
name = "torchvision-0.16.1-cp38-cp38-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchvision-0.16.1%2Bcu121-cp38-cp38-linux_x86_64.whl";
hash = "sha256-xPO1sRtw2yyLBlrp3kduqc6yrVc8fFgGi+CXWkABgrQ=";
};
x86_64-linux-39 = {
name = "torchvision-0.15.2-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp39-cp39-linux_x86_64.whl";
hash = "sha256-8sb1oQC8+QILgvXUyHzX4mrwQJzzO5D7eXsRJ9zULeY=";
name = "torchvision-0.16.1-cp39-cp39-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchvision-0.16.1%2Bcu121-cp39-cp39-linux_x86_64.whl";
hash = "sha256-1voLyIMnBZI9kBleyb819IhwW0nAFEizcCy3t9ebVPk=";
};
x86_64-linux-310 = {
name = "torchvision-0.15.2-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp310-cp310-linux_x86_64.whl";
hash = "sha256-GcpKtdYXm75Tz/ed8ahV7mUzwoYd3HOJ9oNJ2Ln4MCo=";
name = "torchvision-0.16.1-cp310-cp310-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchvision-0.16.1%2Bcu121-cp310-cp310-linux_x86_64.whl";
hash = "sha256-AglL7N9dxCpq/iGQ4ayz8y3ZwtOt2Cfd/pG1RMwjrfQ=";
};
x86_64-linux-311 = {
name = "torchvision-0.15.2-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp311-cp311-linux_x86_64.whl";
hash = "sha256-3vmvR+vCytVcWqLa0SMNz0Jhgz7W34pz6Dm8Izdk8J4=";
name = "torchvision-0.16.1-cp311-cp311-linux_x86_64.whl";
url = "https://download.pytorch.org/whl/cu121/torchvision-0.16.1%2Bcu121-cp311-cp311-linux_x86_64.whl";
hash = "sha256-tO7B2cBOsDa05yrqX0OuM8BkFNqdNjkb0E/9Ma2C+6k=";
};
x86_64-darwin-38 = {
name = "torchvision-0.15.2-cp38-cp38-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp38-cp38-macosx_10_9_x86_64.whl";
hash = "sha256-jxJBW2htuohPsIb1OsgD9pK+WlzdinWPUIErMP/+ouQ=";
name = "torchvision-0.16.1-cp38-cp38-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp38-cp38-macosx_10_13_x86_64.whl";
hash = "sha256-TyytYh+5bPEOKa+T4WyYsyJr3VOucStX6HPD3q8GFhc=";
};
x86_64-darwin-39 = {
name = "torchvision-0.15.2-cp39-cp39-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp39-cp39-macosx_10_9_x86_64.whl";
hash = "sha256-R5AmD89HikHH7MYKbVIAqIFZ/djXVunynw+MWcSmemg=";
name = "torchvision-0.16.1-cp39-cp39-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp39-cp39-macosx_10_13_x86_64.whl";
hash = "sha256-8U0gHDcXbcQQbux2sinWWFoVBSZrjOqZ0zZv04iXt8A=";
};
x86_64-darwin-310 = {
name = "torchvision-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl";
hash = "sha256-d1QIh3ToEMVnKxQqRdzyCxvZhqWn2pD4ZgxD3EP7hQw=";
name = "torchvision-0.16.1-cp310-cp310-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp310-cp310-macosx_10_13_x86_64.whl";
hash = "sha256-mHEyeV5cA3y3TnvjWmk5mf2y9gMVImbuFbgCBug6Www=";
};
x86_64-darwin-311 = {
name = "torchvision-0.15.2-cp311-cp311-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp311-cp311-macosx_10_9_x86_64.whl";
hash = "sha256-XzX2vVvMRWjmUi5BN/pg/McvT6PmFTIcJs2H6FWs05g=";
name = "torchvision-0.16.1-cp311-cp311-macosx_10_9_x86_64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp311-cp311-macosx_10_13_x86_64.whl";
hash = "sha256-Supc9JHGwhscvbsb8qODilnU25OtX0kBmmVk08pxJ8c=";
};
aarch64-darwin-38 = {
name = "torchvision-0.15.2-cp38-cp38-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp38-cp38-macosx_11_0_arm64.whl";
hash = "sha256-MSEcAfi47DO4pjgye1RjIS55oD5DyJX4gEn5evG9Ev0=";
name = "torchvision-0.16.1-cp38-cp38-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp38-cp38-macosx_11_0_arm64.whl";
hash = "sha256-HWFLPJ4t6c11zA5OGSP8+7zZ/bnwigu7v34TXkoKHPo=";
};
aarch64-darwin-39 = {
name = "torchvision-0.15.2-cp39-cp39-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp39-cp39-macosx_11_0_arm64.whl";
hash = "sha256-mHq2IiW0FRoR5T/QYVDFJYztJKydfFR+Dkq2+8qSpc4=";
name = "torchvision-0.16.1-cp39-cp39-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp39-cp39-macosx_11_0_arm64.whl";
hash = "sha256-oV6IqTp1Acx1t2Gi3NB6rtqvnL+vSMiv+oyYmJ7LsZ0=";
};
aarch64-darwin-310 = {
name = "torchvision-0.15.2-cp310-cp310-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp310-cp310-macosx_11_0_arm64.whl";
hash = "sha256-N+sTjhP2ISU3owCawhhpVIOmNcQEtswdjg0Nl4AmqG0=";
name = "torchvision-0.16.1-cp310-cp310-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp310-cp310-macosx_11_0_arm64.whl";
hash = "sha256-JdpqeyLqA0j2LEXsDa8VdzEJa6vK5l0iJAQIGvluCFw=";
};
aarch64-darwin-311 = {
name = "torchvision-0.15.2-cp311-cp311-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.15.2-cp311-cp311-macosx_11_0_arm64.whl";
hash = "sha256-dXUFoKsr5wlsudK/RyMgLJcczt23LHlSp+h393PeD4o=";
name = "torchvision-0.16.1-cp311-cp311-macosx_11_0_arm64.whl";
url = "https://download.pytorch.org/whl/cpu/torchvision-0.16.1-cp311-cp311-macosx_11_0_arm64.whl";
hash = "sha256-M5F1cWdjes4+8zpnydXvhrH4y9k+qlutRe688mbqYIk=";
};
};
}

View file

@ -40,7 +40,7 @@ let
};
pname = "torchvision";
version = "0.15.2";
version = "0.16.1";
in
buildPythonPackage {
inherit pname version;
@ -49,7 +49,7 @@ buildPythonPackage {
owner = "pytorch";
repo = "vision";
rev = "refs/tags/v${version}";
hash = "sha256-KNbOgd6PCINZqZ24c/Ev+ODux3ik5iUlzem9uUfQArM=";
hash = "sha256-TsYBDtedTQ3+F3LM4JwzkGH2XOr0WSp1Au5YoR07rSA=";
};
nativeBuildInputs = [ libpng ninja which ] ++ lib.optionals cudaSupport [ cuda-native-redist ];

View file

@ -5,7 +5,7 @@ set -eou pipefail
version=$1
linux_cuda_version="cu118"
linux_cuda_version="cu121"
linux_bucket="https://download.pytorch.org/whl/${linux_cuda_version}"
darwin_bucket="https://download.pytorch.org/whl/cpu"
@ -14,10 +14,10 @@ url_and_key_list=(
"x86_64-linux-39 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp39-cp39-linux_x86_64.whl torchvision-${version}-cp39-cp39-linux_x86_64.whl"
"x86_64-linux-310 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp310-cp310-linux_x86_64.whl torchvision-${version}-cp310-cp310-linux_x86_64.whl"
"x86_64-linux-311 $linux_bucket/torchvision-${version}%2B${linux_cuda_version}-cp311-cp311-linux_x86_64.whl torchvision-${version}-cp311-cp311-linux_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_10_9_x86_64.whl torchvision-${version}-cp38-cp38-macosx_10_9_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_10_9_x86_64.whl torchvision-${version}-cp39-cp39-macosx_10_9_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_10_9_x86_64.whl torchvision-${version}-cp310-cp310-macosx_10_9_x86_64.whl"
"x86_64-darwin-311 $darwin_bucket/torchvision-${version}-cp311-cp311-macosx_10_9_x86_64.whl torchvision-${version}-cp311-cp311-macosx_10_9_x86_64.whl"
"x86_64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_10_13_x86_64.whl torchvision-${version}-cp38-cp38-macosx_10_9_x86_64.whl"
"x86_64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_10_13_x86_64.whl torchvision-${version}-cp39-cp39-macosx_10_9_x86_64.whl"
"x86_64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_10_13_x86_64.whl torchvision-${version}-cp310-cp310-macosx_10_9_x86_64.whl"
"x86_64-darwin-311 $darwin_bucket/torchvision-${version}-cp311-cp311-macosx_10_13_x86_64.whl torchvision-${version}-cp311-cp311-macosx_10_9_x86_64.whl"
"aarch64-darwin-38 $darwin_bucket/torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl torchvision-${version}-cp38-cp38-macosx_11_0_arm64.whl"
"aarch64-darwin-39 $darwin_bucket/torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl torchvision-${version}-cp39-cp39-macosx_11_0_arm64.whl"
"aarch64-darwin-310 $darwin_bucket/torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl torchvision-${version}-cp310-cp310-macosx_11_0_arm64.whl"

View file

@ -14183,7 +14183,9 @@ self: super: with self; {
torchaudio = callPackage ../development/python-modules/torchaudio { };
torchaudio-bin = callPackage ../development/python-modules/torchaudio/bin.nix { };
torchaudio-bin = callPackage ../development/python-modules/torchaudio/bin.nix {
cudaPackages = pkgs.cudaPackages_12;
};
torchdiffeq = callPackage ../development/python-modules/torchdiffeq { };
@ -14201,7 +14203,9 @@ self: super: with self; {
torchvision = callPackage ../development/python-modules/torchvision { };
torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix { };
torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix {
cudaPackages = pkgs.cudaPackages_12;
};
tornado = callPackage ../development/python-modules/tornado { };