From fadb458e80b1c7c22a017f44acdaec2d326044dd Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 7 Aug 2025 11:39:49 +0200 Subject: [PATCH] python3Packages.torch: 2.7.1 -> 2.8.0 Diff: https://github.com/pytorch/pytorch/compare/v2.7.1...v2.8.0 Changelog: https://github.com/pytorch/pytorch/releases/tag/v2.8.0 Co-authored-by: Luna Nova --- .../python-modules/torch/source/default.nix | 69 +++++--- .../torch/source/nvtx3-hpp-path-fix.patch | 26 +++ .../python-modules/torch/source/src.nix | 167 +++++++++--------- 3 files changed, 156 insertions(+), 106 deletions(-) create mode 100644 pkgs/development/python-modules/torch/source/nvtx3-hpp-path-fix.patch diff --git a/pkgs/development/python-modules/torch/source/default.nix b/pkgs/development/python-modules/torch/source/default.nix index ccd0ac5c6956..56396da3f78d 100644 --- a/pkgs/development/python-modules/torch/source/default.nix +++ b/pkgs/development/python-modules/torch/source/default.nix @@ -3,6 +3,7 @@ lib, fetchFromGitHub, fetchFromGitLab, + fetchpatch2, git-unroll, buildPythonPackage, python, @@ -41,6 +42,7 @@ # Build inputs apple-sdk_13, + openssl, numactl, llvmPackages, @@ -116,7 +118,7 @@ let setBool = v: if v then "1" else "0"; - # https://github.com/pytorch/pytorch/blob/v2.7.0/torch/utils/cpp_extension.py#L2343-L2345 + # https://github.com/pytorch/pytorch/blob/v2.8.0/torch/utils/cpp_extension.py#L2411-L2414 supportedTorchCudaCapabilities = let real = [ @@ -142,8 +144,12 @@ let "10.0a" "10.1" "10.1a" + "10.3" + "10.3a" "12.0" "12.0a" + "12.1" + "12.1a" ]; ptx = lists.map (x: "${x}+PTX") real; in @@ -216,6 +222,7 @@ let rocm-comgr rocm-device-libs rocm-runtime + rocm-smi clr.icd hipify ]; @@ -263,7 +270,7 @@ in buildPythonPackage rec { pname = "torch"; # Don't forget to update torch-bin to the same version. - version = "2.7.1"; + version = "2.8.0"; pyproject = true; stdenv = stdenv'; @@ -287,8 +294,19 @@ buildPythonPackage rec { patches = [ ./clang19-template-warning.patch + + # Do not override PYTHONPATH, otherwise, the build fails with: + # ModuleNotFoundError: No module named 'typing_extensions' + (fetchpatch2 { + name = "cmake-build-preserve-PYTHONPATH"; + url = "https://github.com/pytorch/pytorch/commit/231c72240d80091f099c95e326d3600cba866eee.patch"; + hash = "sha256-7f9qtr7ljqjKdj3DqpcCTS0/Hr2AwOzOl/HA88yU3zI="; + }) + ] + ++ lib.optionals cudaSupport [ + ./fix-cmake-cuda-toolkit.patch + ./nvtx3-hpp-path-fix.patch ] - ++ lib.optionals cudaSupport [ ./fix-cmake-cuda-toolkit.patch ] ++ lib.optionals stdenv.hostPlatform.isLinux [ # Propagate CUPTI to Kineto by overriding the search path with environment variables. # https://github.com/pytorch/pytorch/pull/108847 @@ -302,11 +320,16 @@ buildPythonPackage rec { ]; postPatch = '' - # Prevent NCCL from being cloned during the configure phase - # TODO: remove when updating to the next release as it will not be needed anymore - substituteInPlace tools/build_pytorch_libs.py \ - --replace-fail " checkout_nccl()" " " - + substituteInPlace pyproject.toml \ + --replace-fail "setuptools>=62.3.0,<80.0" "setuptools" + '' + # Provide path to openssl binary for inductor code cache hash + # InductorError: FileNotFoundError: [Errno 2] No such file or directory: 'openssl' + + '' + substituteInPlace torch/_inductor/codecache.py \ + --replace-fail '"openssl"' '"${lib.getExe openssl}"' + '' + + '' substituteInPlace cmake/public/cuda.cmake \ --replace-fail \ 'message(FATAL_ERROR "Found two conflicting CUDA' \ @@ -316,16 +339,20 @@ buildPythonPackage rec { "# Upstream: set(CUDAToolkit_ROOT" substituteInPlace third_party/gloo/cmake/Cuda.cmake \ --replace-warn "find_package(CUDAToolkit 7.0" "find_package(CUDAToolkit" - - # annotations (3.7), print_function (3.0), with_statement (2.6) are all supported + '' + # annotations (3.7), print_function (3.0), with_statement (2.6) are all supported + + '' sed -i -e "/from __future__ import/d" **.py substituteInPlace third_party/NNPACK/CMakeLists.txt \ --replace-fail "PYTHONPATH=" 'PYTHONPATH=$ENV{PYTHONPATH}:' - # flag from cmakeFlags doesn't work, not clear why - # setting it at the top of NNPACK's own CMakeLists does + '' + # flag from cmakeFlags doesn't work, not clear why + # setting it at the top of NNPACK's own CMakeLists does + + '' sed -i '2s;^;set(PYTHON_SIX_SOURCE_DIR ${six.src})\n;' third_party/NNPACK/CMakeLists.txt - - # Ensure that torch profiler unwind uses addr2line from nix + '' + # Ensure that torch profiler unwind uses addr2line from nix + + '' substituteInPlace torch/csrc/profiler/unwind/unwind.cpp \ --replace-fail 'addr2line_binary_ = "addr2line"' 'addr2line_binary_ = "${lib.getExe' binutils "addr2line"}"' '' @@ -334,20 +361,16 @@ buildPythonPackage rec { substituteInPlace third_party/gloo/cmake/Hipify.cmake \ --replace-fail "\''${HIPIFY_COMMAND}" "python \''${HIPIFY_COMMAND}" - # Replace hard-coded rocm paths - substituteInPlace caffe2/CMakeLists.txt \ - --replace-fail "hcc/include" "hip/include" \ - --replace-fail "rocblas/include" "include/rocblas" \ - --replace-fail "hipsparse/include" "include/hipsparse" - # Doesn't pick up the environment variable? substituteInPlace third_party/kineto/libkineto/CMakeLists.txt \ --replace-fail "\''$ENV{ROCM_SOURCE_DIR}" "${rocmtoolkit_joined}" - # Strangely, this is never set in cmake + # Workaround cmake error //include does not exist! in rocm-core-config.cmake + # Removing the call falls back to hip_version. Can likely be removed after ROCm 6.4 bump substituteInPlace cmake/public/LoadHIP.cmake \ - --replace "set(ROCM_PATH \$ENV{ROCM_PATH})" \ - "set(ROCM_PATH \$ENV{ROCM_PATH})''\nset(ROCM_VERSION ${lib.concatStrings (lib.intersperse "0" (lib.splitVersion rocmPackages.clr.version))})" + --replace-fail \ + "find_package(rocm-core CONFIG)" \ + "" # Use composable kernel as dependency, rather than built-in third-party substituteInPlace aten/src/ATen/CMakeLists.txt \ diff --git a/pkgs/development/python-modules/torch/source/nvtx3-hpp-path-fix.patch b/pkgs/development/python-modules/torch/source/nvtx3-hpp-path-fix.patch new file mode 100644 index 000000000000..cabbc484ac76 --- /dev/null +++ b/pkgs/development/python-modules/torch/source/nvtx3-hpp-path-fix.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index a93386c27f8..7c6b98006bf 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -967,7 +967,7 @@ endif() + + # ---[ nvtx + if(USE_SYSTEM_NVTX) +- find_path(nvtx3_dir NAMES nvtx3 PATHS ${CUDA_INCLUDE_DIRS}) ++ find_path(nvtx3_dir NAMES nvtx3/nvtx3.hpp PATHS ${CUDA_INCLUDE_DIRS}) + find_package_handle_standard_args(nvtx3 DEFAULT_MSG nvtx3_dir) + if(NOT nvtx3_FOUND) + message(WARNING "Cannot find system NVTX3, find shipped NVTX3 instead") +@@ -977,9 +977,10 @@ if(NOT TARGET CUDA::nvtx3) + add_library(CUDA::nvtx3 INTERFACE IMPORTED) + endif() + if(NOT nvtx3_dir) +- find_path(nvtx3_dir NAMES nvtx3 PATHS "${PROJECT_SOURCE_DIR}/third_party/NVTX/c/include" NO_DEFAULT_PATH) +- target_include_directories(CUDA::nvtx3 INTERFACE "${nvtx3_dir}") ++ find_path(nvtx3_dir NAMES nvtx3/nvtx3.hpp PATHS "${PROJECT_SOURCE_DIR}/third_party/NVTX/c/include" NO_DEFAULT_PATH) + endif() ++target_include_directories(CUDA::nvtx3 INTERFACE "${nvtx3_dir}") ++message(STATUS "Using NVTX3 include directory: ${nvtx3_dir}") + + + # ---[ HIP diff --git a/pkgs/development/python-modules/torch/source/src.nix b/pkgs/development/python-modules/torch/source/src.nix index af0a47b4fd93..f617227f4a6e 100644 --- a/pkgs/development/python-modules/torch/source/src.nix +++ b/pkgs/development/python-modules/torch/source/src.nix @@ -4,19 +4,19 @@ fetchFromGitHub, runCommand, }: -assert version == "2.7.1"; +assert version == "2.8.0"; (rec { src_asmjit = fetchFromGitHub { owner = "asmjit"; repo = "asmjit"; - rev = "d3fbf7c9bc7c1d1365a94a45614b91c5a3706b81"; - hash = "sha256-0Wv9dxrh9GfajTFb+NpguqqSWH0mqJAj03bxFVJbft8="; + rev = "e5d7c0bd5d9aec44d68830187138149e6a8c4e32"; + hash = "sha256-sI0/9szBMvopQAmVcZSU4D/oaZYdb08AHDSZKy/Qz1g="; }; src_benchmark = fetchFromGitHub { owner = "google"; repo = "benchmark"; - rev = "0d98dba29d66e93259db7daa53a9327df767a415"; - hash = "sha256-yUiFxi80FWBmTZgqmqTMf9oqcBeg3o4I4vKd4djyRWY="; + rev = "299e5928955cc62af9968370293b916f5130916f"; + hash = "sha256-iPK3qLrZL2L08XW1a7SGl7GAt5InQ5nY+Dn8hBuxSOg="; }; src_benchmark_opentelemetry-cpp = fetchFromGitHub { owner = "google"; @@ -48,6 +48,12 @@ assert version == "2.7.1"; rev = "8086bbe3a78d931eb96fe12fdc014082e18d18d3"; hash = "sha256-fyL1SzRs5CXW5CWy6kCN1y1xX6cG+ur7iQlbKX2zbCM="; }; + src_composable_kernel_fbgemm = fetchFromGitHub { + owner = "jwfromm"; + repo = "composable_kernel"; + rev = "4a61bdd4bd4ed730e078aebc7c0fcf046ff29406"; + hash = "sha256-CxcpvW4QxkUDB2zMz7NB6Rt9jXjJeGVExfrYbn9ef5I="; + }; src_composable_kernel_flash-attention = fetchFromGitHub { owner = "ROCm"; repo = "composable_kernel"; @@ -57,8 +63,8 @@ assert version == "2.7.1"; src_cpp-httplib = fetchFromGitHub { owner = "yhirose"; repo = "cpp-httplib"; - rev = "3b6597bba913d51161383657829b7e644e59c006"; - hash = "sha256-dd9NckF1mGhQOyV1LO07QyP51l1kSpYQOH0GkG4v2eE="; + rev = "3af7f2c16147f3fbc6e4d717032daf505dc1652c"; + hash = "sha256-t/ddZjKelnXQdXQvZgv9pQcJt3M2rwgbtTQNW/T6Gpk="; }; src_cpr = fetchFromGitHub { owner = "libcpr"; @@ -69,32 +75,32 @@ assert version == "2.7.1"; src_cpuinfo = fetchFromGitHub { owner = "pytorch"; repo = "cpuinfo"; - rev = "1e83a2fdd3102f65c6f1fb602c1b320486218a99"; - hash = "sha256-28cFACca+NYE8oKlP5aWXNCLeEjhWqJ6gRnFI+VxDvg="; + rev = "5e3d2445e6a84d9599bee2bf78edbb4d80865e1d"; + hash = "sha256-muclbtayPbbxmjTBKJlvTk2Apsx8YwhTu76nKMlSnL0="; }; src_cpuinfo_fbgemm = fetchFromGitHub { owner = "pytorch"; repo = "cpuinfo"; - rev = "ed8b86a253800bafdb7b25c5c399f91bff9cb1f3"; - hash = "sha256-YRqBU83AjxbSE5zquhi4iIiJna/qFWA0jo2GBifqzi8="; + rev = "6543fec09b2f04ac4a666882998b534afc9c1349"; + hash = "sha256-M33853TIMNTJwBjxIG8qeTPwXlX8b8uKiCrdnlAtAA8="; }; src_cudnn-frontend = fetchFromGitHub { owner = "NVIDIA"; repo = "cudnn-frontend"; - rev = "91b7532f3386768bba4f444ee7672b497f34da8a"; - hash = "sha256-Ks07ApADA3xQQ+N5BIfvDG+djCvxYL9btF8Aw7TuMvQ="; + rev = "666996fe3960f27170d1527e5579ba24c8d3380a"; + hash = "sha256-/ae5dNjqkn5dGciGSO+Pn9pzJg+hHWqqQCPcqggWezo="; }; src_cutlass = fetchFromGitHub { owner = "NVIDIA"; repo = "cutlass"; - rev = "afa1772203677c5118fcd82537a9c8fefbcc7008"; - hash = "sha256-oIzlbKRdOh6gp6nRZ8udLSqleBFoFtgM7liCBlHZLOk="; + rev = "ad7b2f5e84fcfa124cb02b91d5bd26d238c0459e"; + hash = "sha256-teziPNA9csYvhkG5t2ht8W8x5+1YGGbHm8VKx4JoxgI="; }; src_cutlass_fbgemm = fetchFromGitHub { - owner = "NVIDIA"; + owner = "jwfromm"; repo = "cutlass"; - rev = "fc9ebc645b63f3a6bc80aaefde5c063fb72110d6"; - hash = "sha256-e2SwXNNwjl/1fV64b+mOJvwGDYeO1LFcqZGbNten37U="; + rev = "3ed8d2ec4ba35ef5d9d8353826209b6f868f63d3"; + hash = "sha256-NntohGvqs6fbWusi2Qv5uzCJhMAfBv8qYoFi38D+mzk="; }; src_cutlass_flash-attention = fetchFromGitHub { owner = "NVIDIA"; @@ -114,18 +120,11 @@ assert version == "2.7.1"; rev = "7d04a0053a845370ae06ce317a22a48e9edcc74e"; hash = "sha256-Je6wAz+uJ/AiAnSZVQ4+pGajZ8DymS0qI9ekB8fGYOo="; }; - src_eigen = fetchFromGitLab { - domain = "gitlab.com"; - owner = "libeigen"; - repo = "eigen"; - rev = "3147391d946bb4b6c68edd901f2add6ac1f31f8c"; - hash = "sha256-1/4xMetKMDOgZgzz3WMxfHUEpmdAm52RqZvz6i0mLEw="; - }; src_fbgemm = fetchFromGitHub { owner = "pytorch"; repo = "fbgemm"; - rev = "dbc3157bf256f1339b3fa1fef2be89ac4078be0e"; - hash = "sha256-PJiFtLnPA6IgxZ2sXIcyyjFRGtb+sG5y2hiWEwFuBOU="; + rev = "157e88b750c452bef2ab4653fe9d1eeb151ce4c3"; + hash = "sha256-Ka8/4gBsbtKNhKM/cWg1NmlKjVeBZvS+yS9SQQxb34A="; }; src_fbjni = fetchFromGitHub { owner = "facebookincubator"; @@ -142,14 +141,14 @@ assert version == "2.7.1"; src_flatbuffers = fetchFromGitHub { owner = "google"; repo = "flatbuffers"; - rev = "01834de25e4bf3975a9a00e816292b1ad0fe184b"; - hash = "sha256-h0lF7jf1cDVVyqhUCi7D0NoZ3b4X/vWXsFplND80lGs="; + rev = "a2cd1ea3b6d3fee220106b5fed3f7ce8da9eb757"; + hash = "sha256-6L6Eb+2xGXEqLYITWsNNPW4FTvfPFSmChK4hLusk5gU="; }; src_fmt = fetchFromGitHub { owner = "fmtlib"; repo = "fmt"; - rev = "123913715afeb8a437e6388b4473fcc4753e1c9a"; - hash = "sha256-sUbxlYi/Aupaox3JjWFqXIjcaQa0LFjclQAOleT+FRA="; + rev = "40626af88bd7df9a5fb80be7b25ac85b122d6c21"; + hash = "sha256-sAlU5L/olxQUYcv8euVYWTTB8TrVeQgXLHtXy8IMEnU="; }; src_fmt_dynolog = fetchFromGitHub { owner = "fmtlib"; @@ -200,16 +199,16 @@ assert version == "2.7.1"; hash = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s="; }; src_gloo = fetchFromGitHub { - owner = "facebookincubator"; + owner = "pytorch"; repo = "gloo"; - rev = "5354032ea08eadd7fc4456477f7f7c6308818509"; - hash = "sha256-JMLtxyQz7jechJ5DmMq0guOfL9leI6khdI9g/5Ckgfc="; + rev = "c7b7b022c124d9643957d9bd55f57ac59fce8fa2"; + hash = "sha256-pZ08gs6wQTZNVDX9uuaQZvw5JKCps8EALegNF0UVV3c="; }; src_googletest = fetchFromGitHub { owner = "google"; repo = "googletest"; - rev = "b514bdc898e2951020cbdca1304b75f5950d1f59"; - hash = "sha256-1OJ2SeSscRBNr7zZ/a8bJGIqAnhkg45re0j3DtPfcXM="; + rev = "52eb8108c5bdec04579160ae17225d66034bd723"; + hash = "sha256-HIHMxAUR4bjmFLoltJeIAVSulVQ6kVuIT2Ku+lwAx/4="; }; src_googletest_dynolog = fetchFromGitHub { owner = "google"; @@ -220,8 +219,8 @@ assert version == "2.7.1"; src_googletest_fbgemm = fetchFromGitHub { owner = "google"; repo = "googletest"; - rev = "cbf019de22c8dd37b2108da35b2748fd702d1796"; - hash = "sha256-G6NihPly7czG2NOX66kFfcf5ya+XRrUWt4SP1Y9JPzs="; + rev = "f8d7d77c06936315286eb55f8de22cd23c188571"; + hash = "sha256-t0RchAHTJbuI5YW4uyBPykTvcjy90JW9AOPNjIhwh6U="; }; src_googletest_kineto = fetchFromGitHub { owner = "google"; @@ -262,8 +261,8 @@ assert version == "2.7.1"; src_hipify_torch = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "hipify_torch"; - rev = "23f53b025b466d8ec3c45d52290d3442f7fbe6b1"; - hash = "sha256-ohbGKy0sxa5pQy9EwsZk2UWmjveCZaJu/PEK2MLbjII="; + rev = "a4337c69fe0e2552a7b7b0669178926beeed828c"; + hash = "sha256-B0+tDjSlZ9C5IAAgteRIgwaJNnptpp1jOP3hTF5AdOw="; }; src_ideep = fetchFromGitHub { owner = "intel"; @@ -274,14 +273,14 @@ assert version == "2.7.1"; src_ittapi = fetchFromGitHub { owner = "intel"; repo = "ittapi"; - rev = "5b8a7d7422611c3a0d799fb5fc5dd4abfae35b42"; - hash = "sha256-VxJky2TF3RcIMqjNaAK/mvpC0afkwpAsY0cD6Ergkls="; + rev = "dec1d23ca65ab069d225dfe40dea14f455170959"; + hash = "sha256-aP95qtYi1s8go6HbXW6hDd0XzdWQhOwXLJBNPCIkSCI="; }; src_json = fetchFromGitHub { owner = "nlohmann"; repo = "json"; - rev = "87cda1d6646592ac5866dc703c8e1839046a6806"; - hash = "sha256-lXYJGWwLyQPqvxnDRWoDLXdjiD81r1eNHi7vRdbIuJ0="; + rev = "55f93686c01528224f448c19128836e7df245f72"; + hash = "sha256-cECvDOLxgX7Q9R3IE86Hj9JJUxraDQvhoyPDF03B2CY="; }; src_json_dynolog = fetchFromGitHub { owner = "nlohmann"; @@ -289,6 +288,12 @@ assert version == "2.7.1"; rev = "4f8fba14066156b73f1189a2b8bd568bde5284c5"; hash = "sha256-DTsZrdB9GcaNkx7ZKxcgCA3A9ShM5icSF0xyGguJNbk="; }; + src_json_fbgemm = fetchFromGitHub { + owner = "nlohmann"; + repo = "json"; + rev = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03"; + hash = "sha256-7F0Jon+1oWL7uqet5i1IgHX0fUw/+z0QwEcA3zs5xHg="; + }; src_json_opentelemetry-cpp = fetchFromGitHub { owner = "nlohmann"; repo = "json"; @@ -298,14 +303,14 @@ assert version == "2.7.1"; src_kineto = fetchFromGitHub { owner = "pytorch"; repo = "kineto"; - rev = "a054a4be0db117c579a21747debf19c863631f26"; - hash = "sha256-FyxMiDoDrjI8JZZNxK4S18yjULkKLUvqLQsCyxaTLSg="; + rev = "5e7501833f1021ce6f618572d3baf657b6319658"; + hash = "sha256-MQNGrWKU1l/lXo4G2hDFaQeNtyQj+pB5sTqm3piPYrY="; }; src_kleidiai = fetchFromGitHub { owner = "ARM-software"; repo = "kleidiai"; - rev = "ef685a13cfbe8d418aa2ed34350e21e4938358b6"; - hash = "sha256-5RS2o+163/6Q+0y0FuWz6OBXw3FKxZINDkGOqlmd2N0="; + rev = "cca02c2f69dd18e1f12647c1c0bdc8cf90e680c7"; + hash = "sha256-+75YvMEJN57cz/jzbqC3E0O7BalfaIfzswRZdpOMx0Q="; }; src_libnop = fetchFromGitHub { owner = "google"; @@ -322,8 +327,8 @@ assert version == "2.7.1"; src_mimalloc = fetchFromGitHub { owner = "microsoft"; repo = "mimalloc"; - rev = "b66e3214d8a104669c2ec05ae91ebc26a8f5ab78"; - hash = "sha256-uwuqln08Hx1d2l7GNn8/8hzOA1Pmzob5g17XgFb+blg="; + rev = "94036de6fe20bfd8a73d4a6d142fcf532ea604d9"; + hash = "sha256-B0gngv16WFLBtrtG5NqA2m5e95bYVcQraeITcOX9A74="; }; src_mkl-dnn = fetchFromGitHub { owner = "intel"; @@ -340,14 +345,14 @@ assert version == "2.7.1"; src_NVTX = fetchFromGitHub { owner = "NVIDIA"; repo = "NVTX"; - rev = "e170594ac7cf1dac584da473d4ca9301087090c1"; - hash = "sha256-n34BPxRnAW301ba1lXqSlGh7jaPqNjpp45GnJ+yDapI="; + rev = "2942f167cc30c5e3a44a2aecd5b0d9c07ff61a07"; + hash = "sha256-MXluy/I5+SaRx2aF64qF4XZ+u67ERAB9TftbOvYt4GE="; }; src_onnx = fetchFromGitHub { owner = "onnx"; repo = "onnx"; - rev = "b8baa8446686496da4cc8fda09f2b6fe65c2a02c"; - hash = "sha256-9oORW0YlQ6SphqfbjcYb0dTlHc+1gzy9quH/Lj6By8Q="; + rev = "e709452ef2bbc1d113faf678c24e6d3467696e83"; + hash = "sha256-UhtF+CWuyv5/Pq/5agLL4Y95YNP63W2BraprhRqJOag="; }; src_opentelemetry-cpp = fetchFromGitHub { owner = "open-telemetry"; @@ -382,8 +387,8 @@ assert version == "2.7.1"; src_pocketfft = fetchFromGitHub { owner = "mreineck"; repo = "pocketfft"; - rev = "9d3ab05a7fffbc71a492bc6a17be034e83e8f0fe"; - hash = "sha256-RSbimayr8Np7YP0aUo1MNusFmhi9jjDfgGXbiISR+/8="; + rev = "0fa0ef591e38c2758e3184c6c23e497b9f732ffa"; + hash = "sha256-Fu786IHiU6Bl66gZ/UJmqOROjlya3viLyzOxwdZVi9c="; }; src_prometheus-cpp = fetchFromGitHub { owner = "jupp0r"; @@ -415,12 +420,6 @@ assert version == "2.7.1"; rev = "a2e59f0e7065404b44dfe92a28aca47ba1378dc4"; hash = "sha256-SNLdtrOjaC3lGHN9MAqTf51U9EzNKQLyTMNPe0GcdrU="; }; - src_pybind11_onnx = fetchFromGitHub { - owner = "pybind"; - repo = "pybind11"; - rev = "3e9dfa2866941655c56877882565e7577de6fc7b"; - hash = "sha256-DVkI5NxM5uME9m3PFYVpJOOa2j+yjL6AJn76fCTv2nE="; - }; src_pybind11_tensorpipe = fetchFromGitHub { owner = "pybind"; repo = "pybind11"; @@ -430,14 +429,14 @@ assert version == "2.7.1"; src_pytorch = fetchFromGitHub { owner = "pytorch"; repo = "pytorch"; - rev = "v2.7.1"; - hash = "sha256-p/SkVM6N4XGr44WB9ZaMLu6nfJGcaKHfb1hDY6qbZBw="; + rev = "v2.8.0"; + hash = "sha256-tFEpcgj0HiJcyBiZMtIrBrnmiCJApfTC1BgOXEGvqCo="; }; src_sleef = fetchFromGitHub { owner = "shibatch"; repo = "sleef"; - rev = "56e1f79cb140fb9326d612d0be06b5250565cade"; - hash = "sha256-5hha7c/Lu6fkbXGlDieoJP6n2bnjY5iPp+hm0f//0ek="; + rev = "5a1d179df9cf652951b59010a2d2075372d67f68"; + hash = "sha256-bjT+F7/nyiB4f0T06/flbpIWFZbUxjf1TjWMe3112Ig="; }; src_tensorpipe = fetchFromGitHub { owner = "pytorch"; @@ -454,8 +453,8 @@ assert version == "2.7.1"; src_VulkanMemoryAllocator = fetchFromGitHub { owner = "GPUOpen-LibrariesAndSDKs"; repo = "VulkanMemoryAllocator"; - rev = "a6bfc237255a6bac1513f7c1ebde6d8aed6b5191"; - hash = "sha256-urUebQaPTgCECmm4Espri1HqYGy0ueAqTBu/VSiX/8I="; + rev = "1d8f600fd424278486eade7ed3e877c99f0846b1"; + hash = "sha256-TPEqV8uHbnyphLG0A+b2tgLDQ6K7a2dOuDHlaFPzTeE="; }; src_XNNPACK = fetchFromGitHub { owner = "google"; @@ -470,6 +469,7 @@ assert version == "2.7.1"; src_civetweb_recursive = src_civetweb; src_clang-cindex-python3_recursive = src_clang-cindex-python3; src_composable_kernel_recursive = src_composable_kernel; + src_composable_kernel_fbgemm_recursive = src_composable_kernel_fbgemm; src_composable_kernel_flash-attention_recursive = src_composable_kernel_flash-attention; src_cpp-httplib_recursive = src_cpp-httplib; src_cpr_recursive = src_cpr; @@ -499,19 +499,22 @@ assert version == "2.7.1"; chmod u+w $out/third_party/pfs cp -r ${src_pfs_recursive}/* $out/third_party/pfs ''; - src_eigen_recursive = src_eigen; src_fbgemm_recursive = runCommand "fbgemm" { } '' cp -r ${src_fbgemm} $out - chmod u+w $out/third_party/asmjit - cp -r ${src_asmjit_recursive}/* $out/third_party/asmjit - chmod u+w $out/third_party/cpuinfo - cp -r ${src_cpuinfo_fbgemm_recursive}/* $out/third_party/cpuinfo - chmod u+w $out/third_party/cutlass - cp -r ${src_cutlass_fbgemm_recursive}/* $out/third_party/cutlass - chmod u+w $out/third_party/googletest - cp -r ${src_googletest_fbgemm_recursive}/* $out/third_party/googletest - chmod u+w $out/third_party/hipify_torch - cp -r ${src_hipify_torch_recursive}/* $out/third_party/hipify_torch + chmod u+w $out/external/asmjit + cp -r ${src_asmjit_recursive}/* $out/external/asmjit + chmod u+w $out/external/composable_kernel + cp -r ${src_composable_kernel_fbgemm_recursive}/* $out/external/composable_kernel + chmod u+w $out/external/cpuinfo + cp -r ${src_cpuinfo_fbgemm_recursive}/* $out/external/cpuinfo + chmod u+w $out/external/cutlass + cp -r ${src_cutlass_fbgemm_recursive}/* $out/external/cutlass + chmod u+w $out/external/googletest + cp -r ${src_googletest_fbgemm_recursive}/* $out/external/googletest + chmod u+w $out/external/hipify_torch + cp -r ${src_hipify_torch_recursive}/* $out/external/hipify_torch + chmod u+w $out/external/json + cp -r ${src_json_fbgemm_recursive}/* $out/external/json ''; src_fbjni_recursive = src_fbjni; src_flash-attention_recursive = runCommand "flash-attention" { } '' @@ -554,6 +557,7 @@ assert version == "2.7.1"; src_ittapi_recursive = src_ittapi; src_json_recursive = src_json; src_json_dynolog_recursive = src_json_dynolog; + src_json_fbgemm_recursive = src_json_fbgemm; src_json_opentelemetry-cpp_recursive = src_json_opentelemetry-cpp; src_kineto_recursive = runCommand "kineto" { } '' cp -r ${src_kineto} $out @@ -574,7 +578,7 @@ assert version == "2.7.1"; src_onnx_recursive = runCommand "onnx" { } '' cp -r ${src_onnx} $out chmod u+w $out/third_party/pybind11 - cp -r ${src_pybind11_onnx_recursive}/* $out/third_party/pybind11 + cp -r ${src_pybind11_recursive}/* $out/third_party/pybind11 ''; src_opentelemetry-cpp_recursive = runCommand "opentelemetry-cpp" { } '' cp -r ${src_opentelemetry-cpp} $out @@ -617,7 +621,6 @@ assert version == "2.7.1"; src_psimd_recursive = src_psimd; src_pthreadpool_recursive = src_pthreadpool; src_pybind11_recursive = src_pybind11; - src_pybind11_onnx_recursive = src_pybind11_onnx; src_pybind11_tensorpipe_recursive = runCommand "pybind11_tensorpipe" { } '' cp -r ${src_pybind11_tensorpipe} $out chmod u+w $out/tools/clang @@ -639,8 +642,6 @@ assert version == "2.7.1"; cp -r ${src_cudnn-frontend_recursive}/* $out/third_party/cudnn_frontend chmod u+w $out/third_party/cutlass cp -r ${src_cutlass_recursive}/* $out/third_party/cutlass - chmod u+w $out/third_party/eigen - cp -r ${src_eigen_recursive}/* $out/third_party/eigen chmod u+w $out/third_party/fbgemm cp -r ${src_fbgemm_recursive}/* $out/third_party/fbgemm chmod u+w $out/third_party/flash-attention