[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: gnu: Add python-pytorch2.
From: |
guix-commits |
Subject: |
branch master updated: gnu: Add python-pytorch2. |
Date: |
Thu, 21 Mar 2024 18:30:24 -0400 |
This is an automated email from the git hooks/post-receive script.
rekado pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 8429f25ecd gnu: Add python-pytorch2.
8429f25ecd is described below
commit 8429f25ecd83594e80676a67ad9c54f0d6cf3f16
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Mar 21 23:26:14 2024 +0100
gnu: Add python-pytorch2.
* gnu/packages/machine-learning.scm (python-pytorch2): New variable.
Change-Id: Ibb837b5765438e7b9ec298537e5009e91d218601
---
gnu/packages/machine-learning.scm | 55 +++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index 5c18a2e9d5..12436cdf71 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4246,6 +4246,61 @@ PyTorch when needed.
Note: currently this package does not provide GPU support.")
(license license:bsd-3)))
+(define-public python-pytorch2
+ (package
+ (inherit python-pytorch)
+ (name "python-pytorch")
+ (version "2.2.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pytorch/pytorch")
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0hdr0d6n072qd0nq2dkxhc9pva6vggj9hpzc0glpc60vfgk0cgzb"))
+ (patches (search-patches "python-pytorch2-system-libraries.patch"
+ "python-pytorch-runpath.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; XXX: Let's be clear: this package is a bundling fest. We
+ ;; delete as much as we can, but there's still a lot left.
+ (for-each (lambda (directory)
+ (delete-file-recursively
+ (string-append "third_party/" directory)))
+ '("benchmark" "cpuinfo" "eigen"
+
+ ;; FIXME: QNNPACK (of which XNNPACK is a fork)
+ ;; needs these.
+ ;; "FP16" "FXdiv" "gemmlowp" "psimd"
+
+ "gloo" "googletest" "ios-cmake" "NNPACK"
+ "onnx" "protobuf" "pthreadpool"
+ "pybind11" "python-peachpy"
+ "tbb" "XNNPACK" "zstd"))
+ (substitute* "caffe2/CMakeLists.txt"
+
(("target_link_libraries\\(\\$\\{test_name\\}_\\$\\{CPU_CAPABILITY\\} c10 sleef
gtest_main\\)")
+ "target_link_libraries(${test_name}_${CPU_CAPABILITY} c10
sleef gtest gtest_main)"))
+ (substitute* "functorch/CMakeLists.txt"
+ (("\\$\\{_rpath_portable_origin\\}/../torch/lib")
+ "$ORIGIN/../torch/lib"))))))
+ (inputs
+ (modify-inputs (package-inputs python-pytorch)
+ (replace "xnnpack" xnnpack-for-torch2)))
+ (propagated-inputs
+ (modify-inputs (package-propagated-inputs python-pytorch)
+ (append python-filelock
+ python-fsspec
+ python-jinja2
+ python-networkx
+ python-opt-einsum
+ python-sympy)
+ (replace "onnx" onnx-for-torch2)
+ (replace "onnx-optimizer" onnx-optimizer-for-torch2)))))
+
(define-public python-pytorch-for-r-torch
(package
(inherit python-pytorch)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: gnu: Add python-pytorch2.,
guix-commits <=