diff options
| author | Ayan Das <bvits@riseup.net> | 2025-08-08 23:27:46 +0530 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-20 13:05:51 +0100 |
| commit | 801d1108b5e2ca224a5a1de3c295fa7f8874ccb2 (patch) | |
| tree | 6d944792d02baf31bd50e81ee54cdfa5566d62f2 /gnu/packages/machine-learning.scm | |
| parent | 9b2f9a4a1ebe746b25e77c784c0839513dfbfd4e (diff) | |
gnu: python-pytorch: Update to 2.8.0.
* gnu/packages/machine-learning.scm (python-pytorch): Update to 2.8.0.
[source]: Update hash. Update CUDA kernel deletion paths.
[arguments]: Add BUILD_TEST=0. Fix concurrentqueue includes. Fix sympy
version constraint. Fix nccl skip phase.
[inputs]: Add concurrentqueue and rdma-core.
* gnu/packages/patches/python-pytorch-system-libraries.patch: Update for 2.8.0.
* gnu/packages/patches/python-pytorch-fix-codegen.patch: Update for 2.8.0.
* gnu/packages/patches/python-pytorch-without-kineto.patch: Update for 2.8.0.
Change-Id: I237913636dfeaa7eb19f7d71516fd05c86373f28
Reviewed-by: David Elsing <david.elsing@posteo.net> @dtelsing
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/machine-learning.scm')
| -rw-r--r-- | gnu/packages/machine-learning.scm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index fdb8a855742..80a36395679 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4935,7 +4935,7 @@ PyTorch.") (base32 "0hdpkhcjry22fjx2zg2r48v7f4ljrclzj0li2pgk76kvyblfbyvm")))))) -(define %python-pytorch-version "2.7.0") +(define %python-pytorch-version "2.8.0") (define %python-pytorch-src (origin @@ -4946,7 +4946,7 @@ PyTorch.") (file-name (git-file-name "python-pytorch" %python-pytorch-version)) (sha256 (base32 - "19prdpzx34n8y2q6wx9dn9vyms6zidjvfgh58d28rfcf5z7z5ra5")) + "0am8mx0mq3hqsk1g99a04a4fdf865g93568qr1f247pl11r2jldl")) (patches (search-patches "python-pytorch-system-libraries.patch" "python-pytorch-runpath.patch" "python-pytorch-without-kineto.patch" @@ -4990,8 +4990,9 @@ PyTorch.") (for-each delete-file (find-files dir "\\.cu$"))) - '("aten/src/ATen/native/transformers/cuda/flash_attn/kernels" - "aten/src/ATen/native/transformers/cuda/mem_eff_attention/kernels")))))) + '("aten/src/ATen/native/transformers/cuda/flash_attn" + "aten/src/ATen/native/transformers/cuda/mem_eff_attention" + "aten/src/ATen/native/transformers/hip/flash_attn")))))) (define-public qnnpack-pytorch (package @@ -5073,7 +5074,7 @@ PyTorch.") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'cmake-patches - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (substitute* "cmake/Dependencies.cmake" (("#POCKETFFT_INCLUDE_DIR") (string-append @@ -5081,6 +5082,9 @@ PyTorch.") (("#FP16_INCLUDE_DIR") (string-append #$(this-package-input "fp16") "/include")) + (("#CONCURRENTQUEUE_INCLUDE_DIR") + (dirname (search-input-file inputs + "include/concurrentqueue/concurrentqueue.h"))) ;; Disable opentelemetry ((".*(add_library|target_include_directories).*opentelemetry.*") "")) @@ -5114,6 +5118,12 @@ PyTorch.") "caffe2/serialize/inline_container.cc" "torch/csrc/inductor/aoti_package/model_package_loader.cpp")) + ;; Fix moodycamel/concurrentqueue includes for system package + (substitute* '("c10/util/Semaphore.h" + "c10/test/util/Semaphore_test.cpp") + (("<moodycamel/concurrentqueue\\.h>") "<concurrentqueue.h>") + (("<moodycamel/lightweightsemaphore\\.h>") "<lightweightsemaphore.h>")) + (substitute* "aten/src/ATen/native/vulkan/api/Allocator.h" (("<include/vk_mem_alloc.h>") "<vk_mem_alloc.h>")) @@ -5152,14 +5162,14 @@ PyTorch.") (package-transitive-supported-systems qnnpack))) (setenv "USE_QNNPACK" "0")) (substitute* '("requirements.txt" "setup.py") - (("sympy==1\\.13\\.1") + (("sympy>=1\\.13\\.3") "sympy>=1.13.1")))) (add-after 'use-system-libraries 'skip-nccl-call (lambda _ ;; Comment-out `checkout_nccl()` invokation in build_pytorch(). (substitute* "tools/build_pytorch_libs.py" (("^[[:blank:]]*checkout_nccl\\(\\)" all) - (string-append "# " all " # Guix: use system NCCL\n"))))) + (string-append "# " all "\n pass"))))) ;; PyTorch is still built with AVX2 and AVX-512 support selected at ;; runtime, but these dependencies require it (nnpack only for ;; x86_64). @@ -5280,6 +5290,7 @@ PyTorch.") (list asmjit brotli ; for cpp-httplib clog + concurrentqueue cpp-httplib eigen flatbuffers @@ -5301,6 +5312,7 @@ PyTorch.") pybind11 ;; qnnpack qnnpack-pytorch + rdma-core sleef tensorpipe vulkan-headers |
