lol

python3Packages.torch: 2.7.1 -> 2.8.0 (#431973)

authored by

Gaétan Lepage and committed by
GitHub
e733b1eb 9fd6ebbe

+164 -110
+50 -23
pkgs/development/python-modules/torch/source/default.nix
··· 1 { 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 fetchFromGitLab, 6 git-unroll, 7 buildPythonPackage, 8 python, ··· 41 42 # Build inputs 43 apple-sdk_13, 44 numactl, 45 llvmPackages, 46 ··· 116 117 setBool = v: if v then "1" else "0"; 118 119 - # https://github.com/pytorch/pytorch/blob/v2.7.0/torch/utils/cpp_extension.py#L2343-L2345 120 supportedTorchCudaCapabilities = 121 let 122 real = [ ··· 142 "10.0a" 143 "10.1" 144 "10.1a" 145 "12.0" 146 "12.0a" 147 ]; 148 ptx = lists.map (x: "${x}+PTX") real; 149 in ··· 216 rocm-comgr 217 rocm-device-libs 218 rocm-runtime 219 clr.icd 220 hipify 221 ]; ··· 243 "Magma cudaPackages does not match cudaPackages" = 244 cudaSupport 245 && (effectiveMagma.cudaPackages.cudaMajorMinorVersion != cudaPackages.cudaMajorMinorVersion); 246 }; 247 248 unroll-src = writeShellScript "unroll-src" '' ··· 263 buildPythonPackage rec { 264 pname = "torch"; 265 # Don't forget to update torch-bin to the same version. 266 - version = "2.7.1"; 267 pyproject = true; 268 269 stdenv = stdenv'; ··· 287 288 patches = [ 289 ./clang19-template-warning.patch 290 ] 291 - ++ lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ] 292 ++ lib.optionals stdenv.hostPlatform.isLinux [ 293 # Propagate CUPTI to Kineto by overriding the search path with environment variables. 294 # https://github.com/pytorch/pytorch/pull/108847 ··· 302 ]; 303 304 postPatch = '' 305 - # Prevent NCCL from being cloned during the configure phase 306 - # TODO: remove when updating to the next release as it will not be needed anymore 307 - substituteInPlace tools/build_pytorch_libs.py \ 308 - --replace-fail " checkout_nccl()" " " 309 - 310 substituteInPlace cmake/public/cuda.cmake \ 311 --replace-fail \ 312 'message(FATAL_ERROR "Found two conflicting CUDA' \ ··· 316 "# Upstream: set(CUDAToolkit_ROOT" 317 substituteInPlace third_party/gloo/cmake/Cuda.cmake \ 318 --replace-warn "find_package(CUDAToolkit 7.0" "find_package(CUDAToolkit" 319 - 320 - # annotations (3.7), print_function (3.0), with_statement (2.6) are all supported 321 sed -i -e "/from __future__ import/d" **.py 322 substituteInPlace third_party/NNPACK/CMakeLists.txt \ 323 --replace-fail "PYTHONPATH=" 'PYTHONPATH=$ENV{PYTHONPATH}:' 324 - # flag from cmakeFlags doesn't work, not clear why 325 - # setting it at the top of NNPACK's own CMakeLists does 326 sed -i '2s;^;set(PYTHON_SIX_SOURCE_DIR ${six.src})\n;' third_party/NNPACK/CMakeLists.txt 327 - 328 - # Ensure that torch profiler unwind uses addr2line from nix 329 substituteInPlace torch/csrc/profiler/unwind/unwind.cpp \ 330 --replace-fail 'addr2line_binary_ = "addr2line"' 'addr2line_binary_ = "${lib.getExe' binutils "addr2line"}"' 331 '' ··· 334 substituteInPlace third_party/gloo/cmake/Hipify.cmake \ 335 --replace-fail "\''${HIPIFY_COMMAND}" "python \''${HIPIFY_COMMAND}" 336 337 - # Replace hard-coded rocm paths 338 - substituteInPlace caffe2/CMakeLists.txt \ 339 - --replace-fail "hcc/include" "hip/include" \ 340 - --replace-fail "rocblas/include" "include/rocblas" \ 341 - --replace-fail "hipsparse/include" "include/hipsparse" 342 - 343 # Doesn't pick up the environment variable? 344 substituteInPlace third_party/kineto/libkineto/CMakeLists.txt \ 345 --replace-fail "\''$ENV{ROCM_SOURCE_DIR}" "${rocmtoolkit_joined}" 346 347 - # Strangely, this is never set in cmake 348 substituteInPlace cmake/public/LoadHIP.cmake \ 349 - --replace "set(ROCM_PATH \$ENV{ROCM_PATH})" \ 350 - "set(ROCM_PATH \$ENV{ROCM_PATH})''\nset(ROCM_VERSION ${lib.concatStrings (lib.intersperse "0" (lib.splitVersion rocmPackages.clr.version))})" 351 352 # Use composable kernel as dependency, rather than built-in third-party 353 substituteInPlace aten/src/ATen/CMakeLists.txt \
··· 1 { 2 stdenv, 3 lib, 4 + pkgs, 5 fetchFromGitHub, 6 fetchFromGitLab, 7 + fetchpatch2, 8 git-unroll, 9 buildPythonPackage, 10 python, ··· 43 44 # Build inputs 45 apple-sdk_13, 46 + openssl, 47 numactl, 48 llvmPackages, 49 ··· 119 120 setBool = v: if v then "1" else "0"; 121 122 + # https://github.com/pytorch/pytorch/blob/v2.8.0/torch/utils/cpp_extension.py#L2411-L2414 123 supportedTorchCudaCapabilities = 124 let 125 real = [ ··· 145 "10.0a" 146 "10.1" 147 "10.1a" 148 + "10.3" 149 + "10.3a" 150 "12.0" 151 "12.0a" 152 + "12.1" 153 + "12.1a" 154 ]; 155 ptx = lists.map (x: "${x}+PTX") real; 156 in ··· 223 rocm-comgr 224 rocm-device-libs 225 rocm-runtime 226 + rocm-smi 227 clr.icd 228 hipify 229 ]; ··· 251 "Magma cudaPackages does not match cudaPackages" = 252 cudaSupport 253 && (effectiveMagma.cudaPackages.cudaMajorMinorVersion != cudaPackages.cudaMajorMinorVersion); 254 + # Should be fixed by WIP https://github.com/NixOS/nixpkgs/pull/438399 255 + "ROCm support on non-default python versions is temporarily broken" = 256 + rocmSupport && (pkgs.python3.version != python.version); 257 }; 258 259 unroll-src = writeShellScript "unroll-src" '' ··· 274 buildPythonPackage rec { 275 pname = "torch"; 276 # Don't forget to update torch-bin to the same version. 277 + version = "2.8.0"; 278 pyproject = true; 279 280 stdenv = stdenv'; ··· 298 299 patches = [ 300 ./clang19-template-warning.patch 301 + 302 + # Do not override PYTHONPATH, otherwise, the build fails with: 303 + # ModuleNotFoundError: No module named 'typing_extensions' 304 + (fetchpatch2 { 305 + name = "cmake-build-preserve-PYTHONPATH"; 306 + url = "https://github.com/pytorch/pytorch/commit/231c72240d80091f099c95e326d3600cba866eee.patch"; 307 + hash = "sha256-7f9qtr7ljqjKdj3DqpcCTS0/Hr2AwOzOl/HA88yU3zI="; 308 + }) 309 ] 310 + ++ lib.optionals cudaSupport [ 311 + ./fix-cmake-cuda-toolkit.patch 312 + ./nvtx3-hpp-path-fix.patch 313 + ] 314 ++ lib.optionals stdenv.hostPlatform.isLinux [ 315 # Propagate CUPTI to Kineto by overriding the search path with environment variables. 316 # https://github.com/pytorch/pytorch/pull/108847 ··· 324 ]; 325 326 postPatch = '' 327 + substituteInPlace pyproject.toml \ 328 + --replace-fail "setuptools>=62.3.0,<80.0" "setuptools" 329 + '' 330 + # Provide path to openssl binary for inductor code cache hash 331 + # InductorError: FileNotFoundError: [Errno 2] No such file or directory: 'openssl' 332 + + '' 333 + substituteInPlace torch/_inductor/codecache.py \ 334 + --replace-fail '"openssl"' '"${lib.getExe openssl}"' 335 + '' 336 + + '' 337 substituteInPlace cmake/public/cuda.cmake \ 338 --replace-fail \ 339 'message(FATAL_ERROR "Found two conflicting CUDA' \ ··· 343 "# Upstream: set(CUDAToolkit_ROOT" 344 substituteInPlace third_party/gloo/cmake/Cuda.cmake \ 345 --replace-warn "find_package(CUDAToolkit 7.0" "find_package(CUDAToolkit" 346 + '' 347 + # annotations (3.7), print_function (3.0), with_statement (2.6) are all supported 348 + + '' 349 sed -i -e "/from __future__ import/d" **.py 350 substituteInPlace third_party/NNPACK/CMakeLists.txt \ 351 --replace-fail "PYTHONPATH=" 'PYTHONPATH=$ENV{PYTHONPATH}:' 352 + '' 353 + # flag from cmakeFlags doesn't work, not clear why 354 + # setting it at the top of NNPACK's own CMakeLists does 355 + + '' 356 sed -i '2s;^;set(PYTHON_SIX_SOURCE_DIR ${six.src})\n;' third_party/NNPACK/CMakeLists.txt 357 + '' 358 + # Ensure that torch profiler unwind uses addr2line from nix 359 + + '' 360 substituteInPlace torch/csrc/profiler/unwind/unwind.cpp \ 361 --replace-fail 'addr2line_binary_ = "addr2line"' 'addr2line_binary_ = "${lib.getExe' binutils "addr2line"}"' 362 '' ··· 365 substituteInPlace third_party/gloo/cmake/Hipify.cmake \ 366 --replace-fail "\''${HIPIFY_COMMAND}" "python \''${HIPIFY_COMMAND}" 367 368 # Doesn't pick up the environment variable? 369 substituteInPlace third_party/kineto/libkineto/CMakeLists.txt \ 370 --replace-fail "\''$ENV{ROCM_SOURCE_DIR}" "${rocmtoolkit_joined}" 371 372 + # Workaround cmake error //include does not exist! in rocm-core-config.cmake 373 + # Removing the call falls back to hip_version. Can likely be removed after ROCm 6.4 bump 374 substituteInPlace cmake/public/LoadHIP.cmake \ 375 + --replace-fail \ 376 + "find_package(rocm-core CONFIG)" \ 377 + "" 378 379 # Use composable kernel as dependency, rather than built-in third-party 380 substituteInPlace aten/src/ATen/CMakeLists.txt \
+26
pkgs/development/python-modules/torch/source/nvtx3-hpp-path-fix.patch
···
··· 1 + diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake 2 + index a93386c27f8..7c6b98006bf 100644 3 + --- a/cmake/Dependencies.cmake 4 + +++ b/cmake/Dependencies.cmake 5 + @@ -967,7 +967,7 @@ endif() 6 + 7 + # ---[ nvtx 8 + if(USE_SYSTEM_NVTX) 9 + - find_path(nvtx3_dir NAMES nvtx3 PATHS ${CUDA_INCLUDE_DIRS}) 10 + + find_path(nvtx3_dir NAMES nvtx3/nvtx3.hpp PATHS ${CUDA_INCLUDE_DIRS}) 11 + find_package_handle_standard_args(nvtx3 DEFAULT_MSG nvtx3_dir) 12 + if(NOT nvtx3_FOUND) 13 + message(WARNING "Cannot find system NVTX3, find shipped NVTX3 instead") 14 + @@ -977,9 +977,10 @@ if(NOT TARGET CUDA::nvtx3) 15 + add_library(CUDA::nvtx3 INTERFACE IMPORTED) 16 + endif() 17 + if(NOT nvtx3_dir) 18 + - find_path(nvtx3_dir NAMES nvtx3 PATHS "${PROJECT_SOURCE_DIR}/third_party/NVTX/c/include" NO_DEFAULT_PATH) 19 + - target_include_directories(CUDA::nvtx3 INTERFACE "${nvtx3_dir}") 20 + + find_path(nvtx3_dir NAMES nvtx3/nvtx3.hpp PATHS "${PROJECT_SOURCE_DIR}/third_party/NVTX/c/include" NO_DEFAULT_PATH) 21 + endif() 22 + +target_include_directories(CUDA::nvtx3 INTERFACE "${nvtx3_dir}") 23 + +message(STATUS "Using NVTX3 include directory: ${nvtx3_dir}") 24 + 25 + 26 + # ---[ HIP
+84 -83
pkgs/development/python-modules/torch/source/src.nix
··· 4 fetchFromGitHub, 5 runCommand, 6 }: 7 - assert version == "2.7.1"; 8 (rec { 9 src_asmjit = fetchFromGitHub { 10 owner = "asmjit"; 11 repo = "asmjit"; 12 - rev = "d3fbf7c9bc7c1d1365a94a45614b91c5a3706b81"; 13 - hash = "sha256-0Wv9dxrh9GfajTFb+NpguqqSWH0mqJAj03bxFVJbft8="; 14 }; 15 src_benchmark = fetchFromGitHub { 16 owner = "google"; 17 repo = "benchmark"; 18 - rev = "0d98dba29d66e93259db7daa53a9327df767a415"; 19 - hash = "sha256-yUiFxi80FWBmTZgqmqTMf9oqcBeg3o4I4vKd4djyRWY="; 20 }; 21 src_benchmark_opentelemetry-cpp = fetchFromGitHub { 22 owner = "google"; ··· 48 rev = "8086bbe3a78d931eb96fe12fdc014082e18d18d3"; 49 hash = "sha256-fyL1SzRs5CXW5CWy6kCN1y1xX6cG+ur7iQlbKX2zbCM="; 50 }; 51 src_composable_kernel_flash-attention = fetchFromGitHub { 52 owner = "ROCm"; 53 repo = "composable_kernel"; ··· 57 src_cpp-httplib = fetchFromGitHub { 58 owner = "yhirose"; 59 repo = "cpp-httplib"; 60 - rev = "3b6597bba913d51161383657829b7e644e59c006"; 61 - hash = "sha256-dd9NckF1mGhQOyV1LO07QyP51l1kSpYQOH0GkG4v2eE="; 62 }; 63 src_cpr = fetchFromGitHub { 64 owner = "libcpr"; ··· 69 src_cpuinfo = fetchFromGitHub { 70 owner = "pytorch"; 71 repo = "cpuinfo"; 72 - rev = "1e83a2fdd3102f65c6f1fb602c1b320486218a99"; 73 - hash = "sha256-28cFACca+NYE8oKlP5aWXNCLeEjhWqJ6gRnFI+VxDvg="; 74 }; 75 src_cpuinfo_fbgemm = fetchFromGitHub { 76 owner = "pytorch"; 77 repo = "cpuinfo"; 78 - rev = "ed8b86a253800bafdb7b25c5c399f91bff9cb1f3"; 79 - hash = "sha256-YRqBU83AjxbSE5zquhi4iIiJna/qFWA0jo2GBifqzi8="; 80 }; 81 src_cudnn-frontend = fetchFromGitHub { 82 owner = "NVIDIA"; 83 repo = "cudnn-frontend"; 84 - rev = "91b7532f3386768bba4f444ee7672b497f34da8a"; 85 - hash = "sha256-Ks07ApADA3xQQ+N5BIfvDG+djCvxYL9btF8Aw7TuMvQ="; 86 }; 87 src_cutlass = fetchFromGitHub { 88 owner = "NVIDIA"; 89 repo = "cutlass"; 90 - rev = "afa1772203677c5118fcd82537a9c8fefbcc7008"; 91 - hash = "sha256-oIzlbKRdOh6gp6nRZ8udLSqleBFoFtgM7liCBlHZLOk="; 92 }; 93 src_cutlass_fbgemm = fetchFromGitHub { 94 - owner = "NVIDIA"; 95 repo = "cutlass"; 96 - rev = "fc9ebc645b63f3a6bc80aaefde5c063fb72110d6"; 97 - hash = "sha256-e2SwXNNwjl/1fV64b+mOJvwGDYeO1LFcqZGbNten37U="; 98 }; 99 src_cutlass_flash-attention = fetchFromGitHub { 100 owner = "NVIDIA"; ··· 114 rev = "7d04a0053a845370ae06ce317a22a48e9edcc74e"; 115 hash = "sha256-Je6wAz+uJ/AiAnSZVQ4+pGajZ8DymS0qI9ekB8fGYOo="; 116 }; 117 - src_eigen = fetchFromGitLab { 118 - domain = "gitlab.com"; 119 - owner = "libeigen"; 120 - repo = "eigen"; 121 - rev = "3147391d946bb4b6c68edd901f2add6ac1f31f8c"; 122 - hash = "sha256-1/4xMetKMDOgZgzz3WMxfHUEpmdAm52RqZvz6i0mLEw="; 123 - }; 124 src_fbgemm = fetchFromGitHub { 125 owner = "pytorch"; 126 repo = "fbgemm"; 127 - rev = "dbc3157bf256f1339b3fa1fef2be89ac4078be0e"; 128 - hash = "sha256-PJiFtLnPA6IgxZ2sXIcyyjFRGtb+sG5y2hiWEwFuBOU="; 129 }; 130 src_fbjni = fetchFromGitHub { 131 owner = "facebookincubator"; ··· 142 src_flatbuffers = fetchFromGitHub { 143 owner = "google"; 144 repo = "flatbuffers"; 145 - rev = "01834de25e4bf3975a9a00e816292b1ad0fe184b"; 146 - hash = "sha256-h0lF7jf1cDVVyqhUCi7D0NoZ3b4X/vWXsFplND80lGs="; 147 }; 148 src_fmt = fetchFromGitHub { 149 owner = "fmtlib"; 150 repo = "fmt"; 151 - rev = "123913715afeb8a437e6388b4473fcc4753e1c9a"; 152 - hash = "sha256-sUbxlYi/Aupaox3JjWFqXIjcaQa0LFjclQAOleT+FRA="; 153 }; 154 src_fmt_dynolog = fetchFromGitHub { 155 owner = "fmtlib"; ··· 200 hash = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s="; 201 }; 202 src_gloo = fetchFromGitHub { 203 - owner = "facebookincubator"; 204 repo = "gloo"; 205 - rev = "5354032ea08eadd7fc4456477f7f7c6308818509"; 206 - hash = "sha256-JMLtxyQz7jechJ5DmMq0guOfL9leI6khdI9g/5Ckgfc="; 207 }; 208 src_googletest = fetchFromGitHub { 209 owner = "google"; 210 repo = "googletest"; 211 - rev = "b514bdc898e2951020cbdca1304b75f5950d1f59"; 212 - hash = "sha256-1OJ2SeSscRBNr7zZ/a8bJGIqAnhkg45re0j3DtPfcXM="; 213 }; 214 src_googletest_dynolog = fetchFromGitHub { 215 owner = "google"; ··· 220 src_googletest_fbgemm = fetchFromGitHub { 221 owner = "google"; 222 repo = "googletest"; 223 - rev = "cbf019de22c8dd37b2108da35b2748fd702d1796"; 224 - hash = "sha256-G6NihPly7czG2NOX66kFfcf5ya+XRrUWt4SP1Y9JPzs="; 225 }; 226 src_googletest_kineto = fetchFromGitHub { 227 owner = "google"; ··· 262 src_hipify_torch = fetchFromGitHub { 263 owner = "ROCmSoftwarePlatform"; 264 repo = "hipify_torch"; 265 - rev = "23f53b025b466d8ec3c45d52290d3442f7fbe6b1"; 266 - hash = "sha256-ohbGKy0sxa5pQy9EwsZk2UWmjveCZaJu/PEK2MLbjII="; 267 }; 268 src_ideep = fetchFromGitHub { 269 owner = "intel"; ··· 274 src_ittapi = fetchFromGitHub { 275 owner = "intel"; 276 repo = "ittapi"; 277 - rev = "5b8a7d7422611c3a0d799fb5fc5dd4abfae35b42"; 278 - hash = "sha256-VxJky2TF3RcIMqjNaAK/mvpC0afkwpAsY0cD6Ergkls="; 279 }; 280 src_json = fetchFromGitHub { 281 owner = "nlohmann"; 282 repo = "json"; 283 - rev = "87cda1d6646592ac5866dc703c8e1839046a6806"; 284 - hash = "sha256-lXYJGWwLyQPqvxnDRWoDLXdjiD81r1eNHi7vRdbIuJ0="; 285 }; 286 src_json_dynolog = fetchFromGitHub { 287 owner = "nlohmann"; ··· 289 rev = "4f8fba14066156b73f1189a2b8bd568bde5284c5"; 290 hash = "sha256-DTsZrdB9GcaNkx7ZKxcgCA3A9ShM5icSF0xyGguJNbk="; 291 }; 292 src_json_opentelemetry-cpp = fetchFromGitHub { 293 owner = "nlohmann"; 294 repo = "json"; ··· 298 src_kineto = fetchFromGitHub { 299 owner = "pytorch"; 300 repo = "kineto"; 301 - rev = "a054a4be0db117c579a21747debf19c863631f26"; 302 - hash = "sha256-FyxMiDoDrjI8JZZNxK4S18yjULkKLUvqLQsCyxaTLSg="; 303 }; 304 src_kleidiai = fetchFromGitHub { 305 owner = "ARM-software"; 306 repo = "kleidiai"; 307 - rev = "ef685a13cfbe8d418aa2ed34350e21e4938358b6"; 308 - hash = "sha256-5RS2o+163/6Q+0y0FuWz6OBXw3FKxZINDkGOqlmd2N0="; 309 }; 310 src_libnop = fetchFromGitHub { 311 owner = "google"; ··· 322 src_mimalloc = fetchFromGitHub { 323 owner = "microsoft"; 324 repo = "mimalloc"; 325 - rev = "b66e3214d8a104669c2ec05ae91ebc26a8f5ab78"; 326 - hash = "sha256-uwuqln08Hx1d2l7GNn8/8hzOA1Pmzob5g17XgFb+blg="; 327 }; 328 src_mkl-dnn = fetchFromGitHub { 329 owner = "intel"; ··· 340 src_NVTX = fetchFromGitHub { 341 owner = "NVIDIA"; 342 repo = "NVTX"; 343 - rev = "e170594ac7cf1dac584da473d4ca9301087090c1"; 344 - hash = "sha256-n34BPxRnAW301ba1lXqSlGh7jaPqNjpp45GnJ+yDapI="; 345 }; 346 src_onnx = fetchFromGitHub { 347 owner = "onnx"; 348 repo = "onnx"; 349 - rev = "b8baa8446686496da4cc8fda09f2b6fe65c2a02c"; 350 - hash = "sha256-9oORW0YlQ6SphqfbjcYb0dTlHc+1gzy9quH/Lj6By8Q="; 351 }; 352 src_opentelemetry-cpp = fetchFromGitHub { 353 owner = "open-telemetry"; ··· 382 src_pocketfft = fetchFromGitHub { 383 owner = "mreineck"; 384 repo = "pocketfft"; 385 - rev = "9d3ab05a7fffbc71a492bc6a17be034e83e8f0fe"; 386 - hash = "sha256-RSbimayr8Np7YP0aUo1MNusFmhi9jjDfgGXbiISR+/8="; 387 }; 388 src_prometheus-cpp = fetchFromGitHub { 389 owner = "jupp0r"; ··· 415 rev = "a2e59f0e7065404b44dfe92a28aca47ba1378dc4"; 416 hash = "sha256-SNLdtrOjaC3lGHN9MAqTf51U9EzNKQLyTMNPe0GcdrU="; 417 }; 418 - src_pybind11_onnx = fetchFromGitHub { 419 - owner = "pybind"; 420 - repo = "pybind11"; 421 - rev = "3e9dfa2866941655c56877882565e7577de6fc7b"; 422 - hash = "sha256-DVkI5NxM5uME9m3PFYVpJOOa2j+yjL6AJn76fCTv2nE="; 423 - }; 424 src_pybind11_tensorpipe = fetchFromGitHub { 425 owner = "pybind"; 426 repo = "pybind11"; ··· 430 src_pytorch = fetchFromGitHub { 431 owner = "pytorch"; 432 repo = "pytorch"; 433 - rev = "v2.7.1"; 434 - hash = "sha256-p/SkVM6N4XGr44WB9ZaMLu6nfJGcaKHfb1hDY6qbZBw="; 435 }; 436 src_sleef = fetchFromGitHub { 437 owner = "shibatch"; 438 repo = "sleef"; 439 - rev = "56e1f79cb140fb9326d612d0be06b5250565cade"; 440 - hash = "sha256-5hha7c/Lu6fkbXGlDieoJP6n2bnjY5iPp+hm0f//0ek="; 441 }; 442 src_tensorpipe = fetchFromGitHub { 443 owner = "pytorch"; ··· 454 src_VulkanMemoryAllocator = fetchFromGitHub { 455 owner = "GPUOpen-LibrariesAndSDKs"; 456 repo = "VulkanMemoryAllocator"; 457 - rev = "a6bfc237255a6bac1513f7c1ebde6d8aed6b5191"; 458 - hash = "sha256-urUebQaPTgCECmm4Espri1HqYGy0ueAqTBu/VSiX/8I="; 459 }; 460 src_XNNPACK = fetchFromGitHub { 461 owner = "google"; ··· 470 src_civetweb_recursive = src_civetweb; 471 src_clang-cindex-python3_recursive = src_clang-cindex-python3; 472 src_composable_kernel_recursive = src_composable_kernel; 473 src_composable_kernel_flash-attention_recursive = src_composable_kernel_flash-attention; 474 src_cpp-httplib_recursive = src_cpp-httplib; 475 src_cpr_recursive = src_cpr; ··· 499 chmod u+w $out/third_party/pfs 500 cp -r ${src_pfs_recursive}/* $out/third_party/pfs 501 ''; 502 - src_eigen_recursive = src_eigen; 503 src_fbgemm_recursive = runCommand "fbgemm" { } '' 504 cp -r ${src_fbgemm} $out 505 - chmod u+w $out/third_party/asmjit 506 - cp -r ${src_asmjit_recursive}/* $out/third_party/asmjit 507 - chmod u+w $out/third_party/cpuinfo 508 - cp -r ${src_cpuinfo_fbgemm_recursive}/* $out/third_party/cpuinfo 509 - chmod u+w $out/third_party/cutlass 510 - cp -r ${src_cutlass_fbgemm_recursive}/* $out/third_party/cutlass 511 - chmod u+w $out/third_party/googletest 512 - cp -r ${src_googletest_fbgemm_recursive}/* $out/third_party/googletest 513 - chmod u+w $out/third_party/hipify_torch 514 - cp -r ${src_hipify_torch_recursive}/* $out/third_party/hipify_torch 515 ''; 516 src_fbjni_recursive = src_fbjni; 517 src_flash-attention_recursive = runCommand "flash-attention" { } '' ··· 554 src_ittapi_recursive = src_ittapi; 555 src_json_recursive = src_json; 556 src_json_dynolog_recursive = src_json_dynolog; 557 src_json_opentelemetry-cpp_recursive = src_json_opentelemetry-cpp; 558 src_kineto_recursive = runCommand "kineto" { } '' 559 cp -r ${src_kineto} $out ··· 574 src_onnx_recursive = runCommand "onnx" { } '' 575 cp -r ${src_onnx} $out 576 chmod u+w $out/third_party/pybind11 577 - cp -r ${src_pybind11_onnx_recursive}/* $out/third_party/pybind11 578 ''; 579 src_opentelemetry-cpp_recursive = runCommand "opentelemetry-cpp" { } '' 580 cp -r ${src_opentelemetry-cpp} $out ··· 617 src_psimd_recursive = src_psimd; 618 src_pthreadpool_recursive = src_pthreadpool; 619 src_pybind11_recursive = src_pybind11; 620 - src_pybind11_onnx_recursive = src_pybind11_onnx; 621 src_pybind11_tensorpipe_recursive = runCommand "pybind11_tensorpipe" { } '' 622 cp -r ${src_pybind11_tensorpipe} $out 623 chmod u+w $out/tools/clang ··· 639 cp -r ${src_cudnn-frontend_recursive}/* $out/third_party/cudnn_frontend 640 chmod u+w $out/third_party/cutlass 641 cp -r ${src_cutlass_recursive}/* $out/third_party/cutlass 642 - chmod u+w $out/third_party/eigen 643 - cp -r ${src_eigen_recursive}/* $out/third_party/eigen 644 chmod u+w $out/third_party/fbgemm 645 cp -r ${src_fbgemm_recursive}/* $out/third_party/fbgemm 646 chmod u+w $out/third_party/flash-attention
··· 4 fetchFromGitHub, 5 runCommand, 6 }: 7 + assert version == "2.8.0"; 8 (rec { 9 src_asmjit = fetchFromGitHub { 10 owner = "asmjit"; 11 repo = "asmjit"; 12 + rev = "e5d7c0bd5d9aec44d68830187138149e6a8c4e32"; 13 + hash = "sha256-sI0/9szBMvopQAmVcZSU4D/oaZYdb08AHDSZKy/Qz1g="; 14 }; 15 src_benchmark = fetchFromGitHub { 16 owner = "google"; 17 repo = "benchmark"; 18 + rev = "299e5928955cc62af9968370293b916f5130916f"; 19 + hash = "sha256-iPK3qLrZL2L08XW1a7SGl7GAt5InQ5nY+Dn8hBuxSOg="; 20 }; 21 src_benchmark_opentelemetry-cpp = fetchFromGitHub { 22 owner = "google"; ··· 48 rev = "8086bbe3a78d931eb96fe12fdc014082e18d18d3"; 49 hash = "sha256-fyL1SzRs5CXW5CWy6kCN1y1xX6cG+ur7iQlbKX2zbCM="; 50 }; 51 + src_composable_kernel_fbgemm = fetchFromGitHub { 52 + owner = "jwfromm"; 53 + repo = "composable_kernel"; 54 + rev = "4a61bdd4bd4ed730e078aebc7c0fcf046ff29406"; 55 + hash = "sha256-CxcpvW4QxkUDB2zMz7NB6Rt9jXjJeGVExfrYbn9ef5I="; 56 + }; 57 src_composable_kernel_flash-attention = fetchFromGitHub { 58 owner = "ROCm"; 59 repo = "composable_kernel"; ··· 63 src_cpp-httplib = fetchFromGitHub { 64 owner = "yhirose"; 65 repo = "cpp-httplib"; 66 + rev = "3af7f2c16147f3fbc6e4d717032daf505dc1652c"; 67 + hash = "sha256-t/ddZjKelnXQdXQvZgv9pQcJt3M2rwgbtTQNW/T6Gpk="; 68 }; 69 src_cpr = fetchFromGitHub { 70 owner = "libcpr"; ··· 75 src_cpuinfo = fetchFromGitHub { 76 owner = "pytorch"; 77 repo = "cpuinfo"; 78 + rev = "5e3d2445e6a84d9599bee2bf78edbb4d80865e1d"; 79 + hash = "sha256-muclbtayPbbxmjTBKJlvTk2Apsx8YwhTu76nKMlSnL0="; 80 }; 81 src_cpuinfo_fbgemm = fetchFromGitHub { 82 owner = "pytorch"; 83 repo = "cpuinfo"; 84 + rev = "6543fec09b2f04ac4a666882998b534afc9c1349"; 85 + hash = "sha256-M33853TIMNTJwBjxIG8qeTPwXlX8b8uKiCrdnlAtAA8="; 86 }; 87 src_cudnn-frontend = fetchFromGitHub { 88 owner = "NVIDIA"; 89 repo = "cudnn-frontend"; 90 + rev = "666996fe3960f27170d1527e5579ba24c8d3380a"; 91 + hash = "sha256-/ae5dNjqkn5dGciGSO+Pn9pzJg+hHWqqQCPcqggWezo="; 92 }; 93 src_cutlass = fetchFromGitHub { 94 owner = "NVIDIA"; 95 repo = "cutlass"; 96 + rev = "ad7b2f5e84fcfa124cb02b91d5bd26d238c0459e"; 97 + hash = "sha256-teziPNA9csYvhkG5t2ht8W8x5+1YGGbHm8VKx4JoxgI="; 98 }; 99 src_cutlass_fbgemm = fetchFromGitHub { 100 + owner = "jwfromm"; 101 repo = "cutlass"; 102 + rev = "3ed8d2ec4ba35ef5d9d8353826209b6f868f63d3"; 103 + hash = "sha256-NntohGvqs6fbWusi2Qv5uzCJhMAfBv8qYoFi38D+mzk="; 104 }; 105 src_cutlass_flash-attention = fetchFromGitHub { 106 owner = "NVIDIA"; ··· 120 rev = "7d04a0053a845370ae06ce317a22a48e9edcc74e"; 121 hash = "sha256-Je6wAz+uJ/AiAnSZVQ4+pGajZ8DymS0qI9ekB8fGYOo="; 122 }; 123 src_fbgemm = fetchFromGitHub { 124 owner = "pytorch"; 125 repo = "fbgemm"; 126 + rev = "157e88b750c452bef2ab4653fe9d1eeb151ce4c3"; 127 + hash = "sha256-Ka8/4gBsbtKNhKM/cWg1NmlKjVeBZvS+yS9SQQxb34A="; 128 }; 129 src_fbjni = fetchFromGitHub { 130 owner = "facebookincubator"; ··· 141 src_flatbuffers = fetchFromGitHub { 142 owner = "google"; 143 repo = "flatbuffers"; 144 + rev = "a2cd1ea3b6d3fee220106b5fed3f7ce8da9eb757"; 145 + hash = "sha256-6L6Eb+2xGXEqLYITWsNNPW4FTvfPFSmChK4hLusk5gU="; 146 }; 147 src_fmt = fetchFromGitHub { 148 owner = "fmtlib"; 149 repo = "fmt"; 150 + rev = "40626af88bd7df9a5fb80be7b25ac85b122d6c21"; 151 + hash = "sha256-sAlU5L/olxQUYcv8euVYWTTB8TrVeQgXLHtXy8IMEnU="; 152 }; 153 src_fmt_dynolog = fetchFromGitHub { 154 owner = "fmtlib"; ··· 199 hash = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s="; 200 }; 201 src_gloo = fetchFromGitHub { 202 + owner = "pytorch"; 203 repo = "gloo"; 204 + rev = "c7b7b022c124d9643957d9bd55f57ac59fce8fa2"; 205 + hash = "sha256-pZ08gs6wQTZNVDX9uuaQZvw5JKCps8EALegNF0UVV3c="; 206 }; 207 src_googletest = fetchFromGitHub { 208 owner = "google"; 209 repo = "googletest"; 210 + rev = "52eb8108c5bdec04579160ae17225d66034bd723"; 211 + hash = "sha256-HIHMxAUR4bjmFLoltJeIAVSulVQ6kVuIT2Ku+lwAx/4="; 212 }; 213 src_googletest_dynolog = fetchFromGitHub { 214 owner = "google"; ··· 219 src_googletest_fbgemm = fetchFromGitHub { 220 owner = "google"; 221 repo = "googletest"; 222 + rev = "f8d7d77c06936315286eb55f8de22cd23c188571"; 223 + hash = "sha256-t0RchAHTJbuI5YW4uyBPykTvcjy90JW9AOPNjIhwh6U="; 224 }; 225 src_googletest_kineto = fetchFromGitHub { 226 owner = "google"; ··· 261 src_hipify_torch = fetchFromGitHub { 262 owner = "ROCmSoftwarePlatform"; 263 repo = "hipify_torch"; 264 + rev = "a4337c69fe0e2552a7b7b0669178926beeed828c"; 265 + hash = "sha256-B0+tDjSlZ9C5IAAgteRIgwaJNnptpp1jOP3hTF5AdOw="; 266 }; 267 src_ideep = fetchFromGitHub { 268 owner = "intel"; ··· 273 src_ittapi = fetchFromGitHub { 274 owner = "intel"; 275 repo = "ittapi"; 276 + rev = "dec1d23ca65ab069d225dfe40dea14f455170959"; 277 + hash = "sha256-aP95qtYi1s8go6HbXW6hDd0XzdWQhOwXLJBNPCIkSCI="; 278 }; 279 src_json = fetchFromGitHub { 280 owner = "nlohmann"; 281 repo = "json"; 282 + rev = "55f93686c01528224f448c19128836e7df245f72"; 283 + hash = "sha256-cECvDOLxgX7Q9R3IE86Hj9JJUxraDQvhoyPDF03B2CY="; 284 }; 285 src_json_dynolog = fetchFromGitHub { 286 owner = "nlohmann"; ··· 288 rev = "4f8fba14066156b73f1189a2b8bd568bde5284c5"; 289 hash = "sha256-DTsZrdB9GcaNkx7ZKxcgCA3A9ShM5icSF0xyGguJNbk="; 290 }; 291 + src_json_fbgemm = fetchFromGitHub { 292 + owner = "nlohmann"; 293 + repo = "json"; 294 + rev = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03"; 295 + hash = "sha256-7F0Jon+1oWL7uqet5i1IgHX0fUw/+z0QwEcA3zs5xHg="; 296 + }; 297 src_json_opentelemetry-cpp = fetchFromGitHub { 298 owner = "nlohmann"; 299 repo = "json"; ··· 303 src_kineto = fetchFromGitHub { 304 owner = "pytorch"; 305 repo = "kineto"; 306 + rev = "5e7501833f1021ce6f618572d3baf657b6319658"; 307 + hash = "sha256-MQNGrWKU1l/lXo4G2hDFaQeNtyQj+pB5sTqm3piPYrY="; 308 }; 309 src_kleidiai = fetchFromGitHub { 310 owner = "ARM-software"; 311 repo = "kleidiai"; 312 + rev = "cca02c2f69dd18e1f12647c1c0bdc8cf90e680c7"; 313 + hash = "sha256-+75YvMEJN57cz/jzbqC3E0O7BalfaIfzswRZdpOMx0Q="; 314 }; 315 src_libnop = fetchFromGitHub { 316 owner = "google"; ··· 327 src_mimalloc = fetchFromGitHub { 328 owner = "microsoft"; 329 repo = "mimalloc"; 330 + rev = "94036de6fe20bfd8a73d4a6d142fcf532ea604d9"; 331 + hash = "sha256-B0gngv16WFLBtrtG5NqA2m5e95bYVcQraeITcOX9A74="; 332 }; 333 src_mkl-dnn = fetchFromGitHub { 334 owner = "intel"; ··· 345 src_NVTX = fetchFromGitHub { 346 owner = "NVIDIA"; 347 repo = "NVTX"; 348 + rev = "2942f167cc30c5e3a44a2aecd5b0d9c07ff61a07"; 349 + hash = "sha256-MXluy/I5+SaRx2aF64qF4XZ+u67ERAB9TftbOvYt4GE="; 350 }; 351 src_onnx = fetchFromGitHub { 352 owner = "onnx"; 353 repo = "onnx"; 354 + rev = "e709452ef2bbc1d113faf678c24e6d3467696e83"; 355 + hash = "sha256-UhtF+CWuyv5/Pq/5agLL4Y95YNP63W2BraprhRqJOag="; 356 }; 357 src_opentelemetry-cpp = fetchFromGitHub { 358 owner = "open-telemetry"; ··· 387 src_pocketfft = fetchFromGitHub { 388 owner = "mreineck"; 389 repo = "pocketfft"; 390 + rev = "0fa0ef591e38c2758e3184c6c23e497b9f732ffa"; 391 + hash = "sha256-Fu786IHiU6Bl66gZ/UJmqOROjlya3viLyzOxwdZVi9c="; 392 }; 393 src_prometheus-cpp = fetchFromGitHub { 394 owner = "jupp0r"; ··· 420 rev = "a2e59f0e7065404b44dfe92a28aca47ba1378dc4"; 421 hash = "sha256-SNLdtrOjaC3lGHN9MAqTf51U9EzNKQLyTMNPe0GcdrU="; 422 }; 423 src_pybind11_tensorpipe = fetchFromGitHub { 424 owner = "pybind"; 425 repo = "pybind11"; ··· 429 src_pytorch = fetchFromGitHub { 430 owner = "pytorch"; 431 repo = "pytorch"; 432 + rev = "v2.8.0"; 433 + hash = "sha256-tFEpcgj0HiJcyBiZMtIrBrnmiCJApfTC1BgOXEGvqCo="; 434 }; 435 src_sleef = fetchFromGitHub { 436 owner = "shibatch"; 437 repo = "sleef"; 438 + rev = "5a1d179df9cf652951b59010a2d2075372d67f68"; 439 + hash = "sha256-bjT+F7/nyiB4f0T06/flbpIWFZbUxjf1TjWMe3112Ig="; 440 }; 441 src_tensorpipe = fetchFromGitHub { 442 owner = "pytorch"; ··· 453 src_VulkanMemoryAllocator = fetchFromGitHub { 454 owner = "GPUOpen-LibrariesAndSDKs"; 455 repo = "VulkanMemoryAllocator"; 456 + rev = "1d8f600fd424278486eade7ed3e877c99f0846b1"; 457 + hash = "sha256-TPEqV8uHbnyphLG0A+b2tgLDQ6K7a2dOuDHlaFPzTeE="; 458 }; 459 src_XNNPACK = fetchFromGitHub { 460 owner = "google"; ··· 469 src_civetweb_recursive = src_civetweb; 470 src_clang-cindex-python3_recursive = src_clang-cindex-python3; 471 src_composable_kernel_recursive = src_composable_kernel; 472 + src_composable_kernel_fbgemm_recursive = src_composable_kernel_fbgemm; 473 src_composable_kernel_flash-attention_recursive = src_composable_kernel_flash-attention; 474 src_cpp-httplib_recursive = src_cpp-httplib; 475 src_cpr_recursive = src_cpr; ··· 499 chmod u+w $out/third_party/pfs 500 cp -r ${src_pfs_recursive}/* $out/third_party/pfs 501 ''; 502 src_fbgemm_recursive = runCommand "fbgemm" { } '' 503 cp -r ${src_fbgemm} $out 504 + chmod u+w $out/external/asmjit 505 + cp -r ${src_asmjit_recursive}/* $out/external/asmjit 506 + chmod u+w $out/external/composable_kernel 507 + cp -r ${src_composable_kernel_fbgemm_recursive}/* $out/external/composable_kernel 508 + chmod u+w $out/external/cpuinfo 509 + cp -r ${src_cpuinfo_fbgemm_recursive}/* $out/external/cpuinfo 510 + chmod u+w $out/external/cutlass 511 + cp -r ${src_cutlass_fbgemm_recursive}/* $out/external/cutlass 512 + chmod u+w $out/external/googletest 513 + cp -r ${src_googletest_fbgemm_recursive}/* $out/external/googletest 514 + chmod u+w $out/external/hipify_torch 515 + cp -r ${src_hipify_torch_recursive}/* $out/external/hipify_torch 516 + chmod u+w $out/external/json 517 + cp -r ${src_json_fbgemm_recursive}/* $out/external/json 518 ''; 519 src_fbjni_recursive = src_fbjni; 520 src_flash-attention_recursive = runCommand "flash-attention" { } '' ··· 557 src_ittapi_recursive = src_ittapi; 558 src_json_recursive = src_json; 559 src_json_dynolog_recursive = src_json_dynolog; 560 + src_json_fbgemm_recursive = src_json_fbgemm; 561 src_json_opentelemetry-cpp_recursive = src_json_opentelemetry-cpp; 562 src_kineto_recursive = runCommand "kineto" { } '' 563 cp -r ${src_kineto} $out ··· 578 src_onnx_recursive = runCommand "onnx" { } '' 579 cp -r ${src_onnx} $out 580 chmod u+w $out/third_party/pybind11 581 + cp -r ${src_pybind11_recursive}/* $out/third_party/pybind11 582 ''; 583 src_opentelemetry-cpp_recursive = runCommand "opentelemetry-cpp" { } '' 584 cp -r ${src_opentelemetry-cpp} $out ··· 621 src_psimd_recursive = src_psimd; 622 src_pthreadpool_recursive = src_pthreadpool; 623 src_pybind11_recursive = src_pybind11; 624 src_pybind11_tensorpipe_recursive = runCommand "pybind11_tensorpipe" { } '' 625 cp -r ${src_pybind11_tensorpipe} $out 626 chmod u+w $out/tools/clang ··· 642 cp -r ${src_cudnn-frontend_recursive}/* $out/third_party/cudnn_frontend 643 chmod u+w $out/third_party/cutlass 644 cp -r ${src_cutlass_recursive}/* $out/third_party/cutlass 645 chmod u+w $out/third_party/fbgemm 646 cp -r ${src_fbgemm_recursive}/* $out/third_party/fbgemm 647 chmod u+w $out/third_party/flash-attention
+2 -2
pkgs/development/python-modules/torchaudio/default.nix
··· 77 in 78 buildPythonPackage rec { 79 pname = "torchaudio"; 80 - version = "2.7.1"; 81 pyproject = true; 82 83 stdenv = torch.stdenv; ··· 86 owner = "pytorch"; 87 repo = "audio"; 88 tag = "v${version}"; 89 - hash = "sha256-T1V+/Oho6Dblh3ah5PljpxKcndy2e1dAlVxC3ay4AM0="; 90 }; 91 92 patches = [
··· 77 in 78 buildPythonPackage rec { 79 pname = "torchaudio"; 80 + version = "2.8.0"; 81 pyproject = true; 82 83 stdenv = torch.stdenv; ··· 86 owner = "pytorch"; 87 repo = "audio"; 88 tag = "v${version}"; 89 + hash = "sha256-SPa6ZWA2AWawfL4Z4mb1nddGaAsGEl/0dwweBpex2Wo="; 90 }; 91 92 patches = [
+2 -2
pkgs/development/python-modules/torchvision/default.nix
··· 29 inherit (torch) cudaCapabilities cudaPackages cudaSupport; 30 31 pname = "torchvision"; 32 - version = "0.22.1"; 33 in 34 buildPythonPackage { 35 format = "setuptools"; ··· 41 owner = "pytorch"; 42 repo = "vision"; 43 tag = "v${version}"; 44 - hash = "sha256-KYIhd0U2HdvNt/vjQ8wA/6l/ZCF8wBm4NrOMgBtoWG4="; 45 }; 46 47 nativeBuildInputs = [
··· 29 inherit (torch) cudaCapabilities cudaPackages cudaSupport; 30 31 pname = "torchvision"; 32 + version = "0.23.0"; 33 in 34 buildPythonPackage { 35 format = "setuptools"; ··· 41 owner = "pytorch"; 42 repo = "vision"; 43 tag = "v${version}"; 44 + hash = "sha256-BfGTq9BsmO5TtQrDED35aaT9quleZ9rcr/81ShfvCbQ="; 45 }; 46 47 nativeBuildInputs = [