summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-07-07 12:06:08 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-07-07 14:02:33 +0200
commitc929619b3618736481fef9731ba0963a8277b89b (patch)
tree57f081bc7a564cfd636660bd58b5278ec7e8f132 /gnu/packages
parent4ddf903872dce121ace3f4d5102dac50b0924a96 (diff)
downloadguix-c929619b3618736481fef9731ba0963a8277b89b.tar.gz
gnu: python-pytorch-for-r-torch: Explicitly keep at 1.11.0.
* gnu/packages/machine-learning.scm (python-pytorch-for-r-torch): Separate
from python-pytorch by overriding version and source.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/machine-learning.scm36
1 files changed, 35 insertions, 1 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index d2332b5485..d7a3cecf6a 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3008,7 +3008,41 @@ PyTorch when needed.
 Note: currently this package does not provide GPU support.")
     (license license:bsd-3)))
 
-(define-public python-pytorch-for-r-torch python-pytorch)
+(define-public python-pytorch-for-r-torch
+  (package
+    (inherit python-pytorch)
+    (name "python-pytorch")
+    (version "1.11.0")
+    (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
+                "1zbk7y74r0ycsfa7x59jnhwhs1gj5rs3n89p15y0212iszgbljq8"))
+              (patches (search-patches "python-pytorch-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-enum" "python-peachpy"
+                              "python-six" "tbb" "XNNPACK" "zstd"))))))))
 
 ;; Keep this in sync with python-pytorch
 (define-public python-torchvision