[PATCH 00/11] Update PyTorch to 2.5.1

  • Open
  • quality assurance status badge
Details
One participant
  • David Elsing
Owner
unassigned
Submitted by
David Elsing
Severity
normal
D
D
David Elsing wrote 2 days ago
(address . guix-patches@gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120215716.15707-1-david.elsing@posteo.net
Hi,

this patch series updates python-pytorch to version 2.5.1.
PyTorch 2.5 is not compatible with oneapi-dnnl version 3.6,
so I did not update the latter yet.

The latest release of r-torch did not change and still depends on PyTorch
version 2.0.1, for which I fixed the build again.

Cheers,
David

David Elsing (11):
gnu: asmjit: Update to commit cfc9f81.
gnu: cpuinfo: Update to commit ca156f7.
gnu: cpp-httplib: Update to 0.18.5.
gnu: flatbuffers-next: Update to 24.12.23.
gnu: onnx: Update to 1.17.0.
gnu: Add pybind11-2.13.
gnu: python-optree: Update to 0.14.0.
gnu: python-sympy: Update to 1.13.3.
gnu: oneapi-dnnl: Regenerate autogenerated files.
gnu: python-pytorch: Update to 2.5.1.
gnu: python-pytorch-for-r-torch: Fix build.

gnu/local.mk | 3 +-
gnu/packages/cpp.scm | 14 +-
gnu/packages/machine-learning.scm | 83 ++++++++++--
gnu/packages/parallel.scm | 8 +-
.../patches/python-optree-fix-32-bit.patch | 122 ------------------
.../patches/python-pytorch-fix-codegen.patch | 42 +++---
.../python-pytorch-system-libraries.patch | 100 +++++++-------
gnu/packages/python-xyz.scm | 56 +++++---
gnu/packages/serialization.scm | 6 +-
9 files changed, 198 insertions(+), 236 deletions(-)
delete mode 100644 gnu/packages/patches/python-optree-fix-32-bit.patch

--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 01/11] gnu: asmjit: Update to commit cfc9f81.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-1-david.elsing@posteo.net
* gnu/packages/cpp.scm (asmjit): Update to commit cfc9f81.
---
gnu/packages/cpp.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 17b1c514d5..ae973129b4 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,7 +29,7 @@
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2022-2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2022-2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
@@ -164,8 +164,8 @@ (define-public argagg
(license license:expat))))
(define-public asmjit
- (let ((commit "062e69ca81defa35eb0ee15f7412f49a0dad3cdb")
- (revision "1"))
+ (let ((commit "cfc9f813cc6ccda63cad872edb32b38e0662bedb")
+ (revision "2"))
(package
(name "asmjit")
(version (git-version "0.0.0" revision commit))
@@ -178,7 +178,7 @@ (define-public asmjit
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0lcwqzbv2628g3c7sflkwagyh49lp471px8bhg7lr77w9y94srqq"))))
+ (base32 "0lxkfg0b2bc2la0cvs5658a26mb00zlir4n0jkzzlg97l0jrbwpv"))))
(build-system cmake-build-system)
(arguments
(list #:configure-flags #~(list "-DASMJIT_TEST=TRUE")))
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 03/11] gnu: cpp-httplib: Update to 0.18.5.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-3-david.elsing@posteo.net
* gnu/packages/cpp.scm (cpp-httplib): Update to 0.18.5.
[native-inputs] Add curl.
---
gnu/packages/cpp.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index ae973129b4..1d538b5a4e 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1248,7 +1248,7 @@ (define-public cpp-httplib
;; header
(package
(name "cpp-httplib")
- (version "0.16.0")
+ (version "0.18.5")
(source
(origin
(method git-fetch)
@@ -1256,7 +1256,7 @@ (define-public cpp-httplib
(url "https://github.com/yhirose/cpp-httplib")
(commit (string-append "v" version))))
(sha256
- (base32 "0n4ribq7c6lqj0hn50pdvy7wml62fqbgrgysb038fq1qc6xyw3np"))
+ (base32 "1jc31n4xdrknal4i1dvf8j6j9kafpczi0w5gbbi89xlir9dgm5kp"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
@@ -1292,7 +1292,7 @@ (define-public cpp-httplib
"TooManyRedirectTest" "UrlWithSpace"
"YahooRedirectTest" "YahooRedirectTest")))))))
(native-inputs
- (list googletest python))
+ (list curl googletest python))
(inputs
(list brotli openssl zlib))
(home-page "https://github.com/yhirose/cpp-httplib")
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 04/11] gnu: flatbuffers-next: Update to 24.12.23.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-4-david.elsing@posteo.net
* gnu/packages/serialization.scm (flatbuffers-next): Update to 24.12.23.
---
gnu/packages/serialization.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 338682d16c..d9a9e240f9 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -20,7 +20,7 @@
;;; Copyright © 2024 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -946,7 +946,7 @@ (define-public flatbuffers-23.1
(define-public flatbuffers-next
(package
(inherit flatbuffers)
- (version "24.3.25")
+ (version "24.12.23")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -955,7 +955,7 @@ (define-public flatbuffers-next
(file-name (git-file-name "flatbuffers" version))
(sha256
(base32
- "0q066x1h0x9225aj25jv40gxgz46yvwmiqc2g6q06mkkg1144kxq"))))))
+ "01g64kmjw8dfhj12j5fgyx70avix9p1ml4w25lm726dixmpq9gp8"))))))
(define-public python-flatbuffers
(package
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 02/11] gnu: cpuinfo: Update to commit ca156f7.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-2-david.elsing@posteo.net
* gnu/packages/parallel.scm (cpuinfo): Update to commit ca156f7.
---
gnu/packages/parallel.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 0197891fb6..19da40fe98 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -13,7 +13,7 @@
;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -599,8 +599,8 @@ (define-public pthreadpool
(define-public cpuinfo
;; There's currently no tag on this repo.
(let ((version "0.0")
- (revision "3")
- (commit "05332fd802d9109a2a151ec32154b107c1e5caf9"))
+ (revision "4")
+ (commit "ca156f7bc9109c552973414a63d310f76ef0cbf8"))
(package
(name "cpuinfo")
(version (git-version version revision commit))
@@ -611,7 +611,7 @@ (define-public cpuinfo
(file-name (git-file-name name version))
(sha256
(base32
- "0w0kfc1fn9viirkhbr8dgfy9m5clfsg3k9p6kdxhzqpyjhgd252n"))))
+ "12ip6mnmymqhcbi8p98cn109y47pg9ygbj3k96r22dbmr77a50c4"))))
(build-system cmake-build-system)
(arguments
(list
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 05/11] gnu: onnx: Update to 1.17.0.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-5-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (onnx): Update to 1.17.0.
---
gnu/packages/machine-learning.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index cd39b34d83..8ec29ce742 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -27,7 +27,7 @@
;;; Copyright © 2024 David Pflug <david@pflug.io>
;;; Copyright © 2024 Timothee Mathieu <timothee.mathieu@inria.fr>
;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Andy Tai <atai@atai.org>
;;;
;;; This file is part of GNU Guix.
@@ -1445,7 +1445,7 @@ (define (delete-ifdefs file)
(define-public onnx
(package
(name "onnx")
- (version "1.16.2")
+ (version "1.17.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1453,7 +1453,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "0f5h204ksfz4ir3qq38ckxja1jfhf1vn5xzwrj83vkkbfjq6fv16"))
+ "1i6bh4z2xzz1maykr0xmrwfybm6i3g38vnx7hsls8hr58rdr30zn"))
(file-name (git-file-name name version))
(patches (search-patches
"onnx-shared-libraries.patch"
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 08/11] gnu: python-sympy: Update to 1.13.3.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-8-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (python-sympy): Update to 1.13.3.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Adjust 'check phase.
[native-inputs]: New field to add python-hypothesis, python-pytest,
python-setuptools and python-wheel.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9f097a0caa..0e375bdeea 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -14961,24 +14961,28 @@ (define-public python-syllables
(define-public python-sympy
(package
(name "python-sympy")
- (version "1.11.1")
+ (version "1.13.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sympy" version))
(sha256
- (base32 "0n46x1rfy8c2a9za3yp2va5icigxj805f9fmiq8c1drwwvf808z3"))))
- (build-system python-build-system)
+ (base32 "1nf4zrjjbnv47n6sl6x9blfyarski61vdjaz4ygb62hfag3d4zxj"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
+ '(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke
- (or (which "python3") (which "python"))
- "-c" "import sympy; sympy.test(\"/core\")"))))))
- (propagated-inputs
- (list python-mpmath))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "python3" "-c"
+ "import sympy; sympy.test(\"/core\")")))))))
+ (propagated-inputs (list python-mpmath))
+ (native-inputs
+ (list python-hypothesis
+ python-pytest
+ python-setuptools
+ python-wheel))
(home-page "https://www.sympy.org/")
(synopsis "Python library for symbolic mathematics")
(description
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 10/11] gnu: python-pytorch: Update to 2.5.1.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-10-david.elsing@posteo.net
This also updates the qnnpack-pytorch package.

* gnu/packages/machine-learning.scm (%python-pytorch-version): Set to 2.5.1.
(%python-pytorch-src): Adjust hash accordingly.
(python-pytorch)[arguments]<#:phases>: Add 'remove-fr-trace-script
phase. Adjust 'use-system-libraries phase.
[native-inputs]: Add nlohmann-json. Replace cmake with cmake-minimal.
[inputs]: Remove foxi.
* gnu/packages/patches/python-pytorch-fix-codegen.patch: Adjust patch.
* gnu/packages/patches/python-pytorch-system-libraries.patch: Adjust patch.
---
gnu/packages/machine-learning.scm | 21 +++-
.../patches/python-pytorch-fix-codegen.patch | 42 +++++---
.../python-pytorch-system-libraries.patch | 100 +++++++++---------
3 files changed, 90 insertions(+), 73 deletions(-)

Toggle diff (424 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index aa6cfc01f7..7993e845a9 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4603,7 +4603,7 @@ (define-public ideep-pytorch-for-r-torch
(base32
"0hdpkhcjry22fjx2zg2r48v7f4ljrclzj0li2pgk76kvyblfbyvm"))))))
-(define %python-pytorch-version "2.4.0")
+(define %python-pytorch-version "2.5.1")
(define %python-pytorch-src
(origin
@@ -4614,7 +4614,7 @@ (define %python-pytorch-src
(file-name (git-file-name "python-pytorch" %python-pytorch-version))
(sha256
(base32
- "18hdhzr12brj0b7ppyiscax0dbra30207qx0cckw78midfkcn7cn"))
+ "052cvagpmm9y7jspjpcyysx8yc5fhxnjl8rcz6nndis06v8dcj8s"))
(patches (search-patches "python-pytorch-system-libraries.patch"
"python-pytorch-runpath.patch"
"python-pytorch-without-kineto.patch"
@@ -4760,6 +4760,14 @@ (define-public python-pytorch
(string-append #$output "/lib/python"
#$(version-major+minor (package-version python))
"/site-packages")))))
+ ;; This entry point is broken, because it refers to a module that is
+ ;; (intentionally) not installed
+ ;; (https://github.com/pytorch/pytorch/pull/134729), which causes
+ ;; the 'sanity-check phase to fail.
+ (add-after 'unpack 'remove-fr-trace-script
+ (lambda _
+ (substitute* "setup.py"
+ (("entry_points\\[\"console_scripts\"\\]\\.append\\(") "("))))
(add-before 'build 'use-system-libraries
(lambda _
(substitute* '("caffe2/serialize/crc.cc"
@@ -4797,7 +4805,10 @@ (define-public python-pytorch
(or (%current-target-system)
(%current-system))
(package-transitive-supported-systems qnnpack)))
- (setenv "USE_QNNPACK" "0"))))
+ (setenv "USE_QNNPACK" "0"))
+ (substitute* '("requirements.txt" "setup.py")
+ (("sympy==1\\.13\\.1")
+ "sympy>=1.13.1"))))
;; PyTorch is still built with AVX2 and AVX-512 support selected at
;; runtime, but these dependencies require it (nnpack only for
;; x86_64).
@@ -4898,10 +4909,11 @@ (define-public python-pytorch
;; Even only the core tests take a very long time to run.
#:tests? #f))
(native-inputs
- (list cmake
+ (list cmake-minimal
doxygen
ideep-pytorch
ninja
+ nlohmann-json
pocketfft-cpp
python-expecttest
python-pytest-flakefinder
@@ -4921,7 +4933,6 @@ (define-public python-pytorch
eigen
flatbuffers-next
fmt
- foxi
fp16
fxdiv
gemmlowp
diff --git a/gnu/packages/patches/python-pytorch-fix-codegen.patch b/gnu/packages/patches/python-pytorch-fix-codegen.patch
index b30094de09..106ea7db66 100644
--- a/gnu/packages/patches/python-pytorch-fix-codegen.patch
+++ b/gnu/packages/patches/python-pytorch-fix-codegen.patch
@@ -6,7 +6,7 @@ is later corrected. codegen_external.py is patched to avoid duplicate
functions and add the static keyword as in the existing generated file.
diff --git a/tools/gen_flatbuffers.sh b/tools/gen_flatbuffers.sh
-index cc0263d..ac34e84 100644
+index cc0263dbbf..ac34e84b82 100644
--- a/tools/gen_flatbuffers.sh
+++ b/tools/gen_flatbuffers.sh
@@ -1,13 +1,13 @@
@@ -32,7 +32,7 @@ index cc0263d..ac34e84 100644
-c "$ROOT/torch/csrc/jit/serialization/mobile_bytecode.fbs"
echo '// @generated' >> "$ROOT/torch/csrc/jit/serialization/mobile_bytecode_generated.h"
diff --git a/torch/csrc/jit/tensorexpr/codegen_external.py b/torch/csrc/jit/tensorexpr/codegen_external.py
-index 5dcf1b2..0e20b0c 100644
+index 5dcf1b2840..0e20b0c102 100644
--- a/torch/csrc/jit/tensorexpr/codegen_external.py
+++ b/torch/csrc/jit/tensorexpr/codegen_external.py
@@ -21,9 +21,14 @@ def gen_external(native_functions_path, tags_path, external_path):
@@ -61,7 +61,7 @@ index 5dcf1b2..0e20b0c 100644
void** buf_data,
int64_t* buf_ranks,
diff --git a/torchgen/decompositions/gen_jit_decompositions.py b/torchgen/decompositions/gen_jit_decompositions.py
-index 7a0024f..6b2445f 100644
+index b42948045c..e1cfc73a5e 100644
--- a/torchgen/decompositions/gen_jit_decompositions.py
+++ b/torchgen/decompositions/gen_jit_decompositions.py
@@ -1,8 +1,12 @@
@@ -76,9 +76,9 @@ index 7a0024f..6b2445f 100644
+else:
+ decomposition_table = {}
- # from torchgen.code_template import CodeTemplate
-@@ -85,7 +89,7 @@ def write_decomposition_util_file(path: str) -> None:
+ # from torchgen.code_template import CodeTemplate
+@@ -86,7 +90,7 @@ def write_decomposition_util_file(path: str) -> None:
def main() -> None:
@@ -88,27 +88,28 @@ index 7a0024f..6b2445f 100644
write_decomposition_util_file(str(upgrader_path))
diff --git a/torchgen/operator_versions/gen_mobile_upgraders.py b/torchgen/operator_versions/gen_mobile_upgraders.py
-index 2907076..6866332 100644
+index 362ce427d5..245056f815 100644
--- a/torchgen/operator_versions/gen_mobile_upgraders.py
+++ b/torchgen/operator_versions/gen_mobile_upgraders.py
-@@ -3,10 +3,12 @@ import os
+@@ -6,10 +6,13 @@ import os
from enum import Enum
from operator import itemgetter
from pathlib import Path
+import sys
- from typing import Any, Dict, List
+ from typing import Any
-import torch
-from torch.jit.generate_bytecode import generate_upgraders_bytecode
+if len(sys.argv) < 2 or sys.argv[1] != "dummy":
+ import torch
+ from torch.jit.generate_bytecode import generate_upgraders_bytecode
-
++
from torchgen.code_template import CodeTemplate
from torchgen.operator_versions.gen_mobile_upgraders_constant import (
-@@ -263,7 +265,10 @@ def construct_register_size(register_size_from_yaml: int) -> str:
+ MOBILE_UPGRADERS_HEADER_DESCRIPTION,
+@@ -265,7 +268,10 @@ def construct_register_size(register_size_from_yaml: int) -> str:
def construct_version_maps(
- upgrader_bytecode_function_to_index_map: Dict[str, Any]
+ upgrader_bytecode_function_to_index_map: dict[str, Any]
) -> str:
- version_map = torch._C._get_operator_version_map()
+ if len(sys.argv) < 2 or sys.argv[1] != "dummy":
@@ -118,7 +119,7 @@ index 2907076..6866332 100644
sorted_version_map_ = sorted(version_map.items(), key=itemgetter(0)) # type: ignore[no-any-return]
sorted_version_map = dict(sorted_version_map_)
-@@ -379,7 +384,10 @@ def sort_upgrader(upgrader_list: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
+@@ -381,7 +387,10 @@ def sort_upgrader(upgrader_list: list[dict[str, Any]]) -> list[dict[str, Any]]:
def main() -> None:
@@ -131,16 +132,24 @@ index 2907076..6866332 100644
for up in sorted_upgrader_list:
print("after sort upgrader : ", next(iter(up)))
diff --git a/torchgen/shape_functions/gen_jit_shape_functions.py b/torchgen/shape_functions/gen_jit_shape_functions.py
-index bdfd5c7..72b237a 100644
+index 56a3d8bf0d..490a3ea2e7 100644
--- a/torchgen/shape_functions/gen_jit_shape_functions.py
+++ b/torchgen/shape_functions/gen_jit_shape_functions.py
-@@ -18,16 +18,20 @@ you are in the root directory of the Pytorch git repo"""
+@@ -1,6 +1,7 @@
+ #!/usr/bin/env python3
+ import os
+ import sys
++import importlib
+ from importlib.util import module_from_spec, spec_from_file_location
+ from itertools import chain
+ from pathlib import Path
+@@ -18,16 +19,21 @@ you are in the root directory of the Pytorch git repo"""
if not file_path.exists():
raise Exception(err_msg) # noqa: TRY002
--spec = importlib.util.spec_from_file_location(module_name, file_path)
+-spec = spec_from_file_location(module_name, file_path)
-assert spec is not None
--module = importlib.util.module_from_spec(spec)
+-module = module_from_spec(spec)
-sys.modules[module_name] = module
-assert spec.loader is not None
-assert module is not None
@@ -159,6 +168,7 @@ index bdfd5c7..72b237a 100644
+
+ bounded_compute_graph_mapping = module.bounded_compute_graph_mapping
+ shape_compute_graph_mapping = module.shape_compute_graph_mapping
++
+else:
+ bounded_compute_graph_mapping = {}
+ shape_compute_graph_mapping = {}
diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch
index 025b3241a1..6b3f36f3f0 100644
--- a/gnu/packages/patches/python-pytorch-system-libraries.patch
+++ b/gnu/packages/patches/python-pytorch-system-libraries.patch
@@ -5,10 +5,10 @@ httlib, ideep, miniz, nnpack, oneapi-dnnl, pocketfft, pthreadpool,
qnnpack-pytorch, tensorpipe, valgrind and xnnpack packages.
diff --git a/aten/src/ATen/CMakeLists.txt b/aten/src/ATen/CMakeLists.txt
-index 0087dd9..0235fa1 100644
+index 6d9152a4d0..97cb945722 100644
--- a/aten/src/ATen/CMakeLists.txt
+++ b/aten/src/ATen/CMakeLists.txt
-@@ -419,9 +419,9 @@ if(AT_NNPACK_ENABLED)
+@@ -414,9 +414,9 @@ if(AT_NNPACK_ENABLED)
list(APPEND ATen_CPU_DEPENDENCY_LIBS nnpack) # cpuinfo is added below
endif()
@@ -22,7 +22,7 @@ index 0087dd9..0235fa1 100644
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x|ppc64le)$")
list(APPEND ATen_CPU_DEPENDENCY_LIBS cpuinfo)
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
-index 89c31fa..e6d9ef1 100644
+index 9be7f3732f..111215dacc 100644
--- a/caffe2/CMakeLists.txt
+++ b/caffe2/CMakeLists.txt
@@ -91,9 +91,6 @@ if(NOT MSVC AND USE_XNNPACK)
@@ -35,7 +35,7 @@ index 89c31fa..e6d9ef1 100644
endif()
endif()
-@@ -1075,7 +1072,6 @@ if(USE_XPU)
+@@ -1081,7 +1078,6 @@ if(USE_XPU)
endif()
if(NOT MSVC AND USE_XNNPACK)
@@ -43,17 +43,18 @@ index 89c31fa..e6d9ef1 100644
endif()
# ==========================================================
-@@ -1189,6 +1185,9 @@ endif()
+@@ -1195,8 +1191,8 @@ endif()
target_include_directories(torch_cpu PRIVATE
${TORCH_ROOT}/third_party/cpp-httplib)
+-target_include_directories(torch_cpu PRIVATE
+- ${TORCH_ROOT}/third_party/nlohmann/include)
+find_package(httplib REQUIRED)
+target_link_libraries(torch_cpu PUBLIC httplib::httplib)
-+
+
install(DIRECTORY "${TORCH_SRC_DIR}/csrc"
DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}/torch
- FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
-@@ -1417,6 +1416,7 @@ target_link_libraries(torch_cpu PUBLIC c10)
+@@ -1425,6 +1421,7 @@ target_link_libraries(torch_cpu PUBLIC c10)
target_link_libraries(torch_cpu PUBLIC ${Caffe2_PUBLIC_DEPENDENCY_LIBS})
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_LIBS})
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_WHOLE_LINK_LIBS})
@@ -61,7 +62,7 @@ index 89c31fa..e6d9ef1 100644
if(USE_MPI)
target_link_libraries(torch_cpu PRIVATE MPI::MPI_CXX)
endif()
-@@ -1694,7 +1694,7 @@ if(BUILD_STATIC_RUNTIME_BENCHMARK)
+@@ -1659,7 +1656,7 @@ if(BUILD_STATIC_RUNTIME_BENCHMARK)
add_executable(static_runtime_bench "${STATIC_RUNTIME_BENCHMARK_SRCS}")
add_executable(static_runtime_test "${STATIC_RUNTIME_TEST_SRCS}")
target_link_libraries(static_runtime_bench torch_library benchmark)
@@ -70,7 +71,7 @@ index 89c31fa..e6d9ef1 100644
endif()
if(BUILD_MOBILE_BENCHMARK)
-@@ -1713,7 +1713,7 @@ if(BUILD_MOBILE_TEST)
+@@ -1678,7 +1675,7 @@ if(BUILD_MOBILE_TEST)
foreach(test_src ${ATen_MOBILE_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -79,16 +80,16 @@ index 89c31fa..e6d9ef1 100644
target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
target_include_directories(${test_name} PRIVATE ${ATen_CPU_INCLUDE})
-@@ -1734,7 +1734,7 @@ if(BUILD_TEST)
+@@ -1699,7 +1696,7 @@ if(BUILD_TEST)
if(NOT MSVC)
add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}" ../aten/src/ATen/native/quantized/AffineQuantizerBase.cpp)
# TODO: Get rid of c10 dependency (which is only needed for the implementation of AT_ERROR)
-- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main)
-+ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest)
+- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main nlohmann)
++ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest nlohmann)
if(USE_FBGEMM)
target_link_libraries(${test_name}_${CPU_CAPABILITY} fbgemm)
endif()
-@@ -1748,7 +1748,7 @@ if(BUILD_TEST)
+@@ -1713,7 +1710,7 @@ if(BUILD_TEST)
endif()
else()
add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}")
@@ -97,7 +98,7 @@ index 89c31fa..e6d9ef1 100644
endif()
target_include_directories(${test_name}_${CPU_CAPABILITY} PRIVATE $<INSTALL_INTERFACE:include>)
target_include_directories(${test_name}_${CPU_CAPABILITY} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
-@@ -1765,7 +1765,7 @@ if(BUILD_TEST)
+@@ -1730,7 +1727,7 @@ if(BUILD_TEST)
foreach(test_src ${Caffe2_CPU_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -106,7 +107,7 @@ index 89c31fa..e6d9ef1 100644
if(NOT MSVC)
target_link_libraries(${test_name} stdc++)
endif()
-@@ -1845,7 +1845,7 @@ if(BUILD_TEST)
+@@ -1810,7 +1807,7 @@ if(BUILD_TEST)
foreach(test_src ${Caffe2_VULKAN_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -116,7 +117,7 @@ index 89c31fa..e6d9ef1 100644
target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
diff --git a/caffe2/serialize/CMakeLists.txt b/caffe2/serialize/CMakeLists.txt
-index 1552b59..67e1a9a 100644
+index 1552b59d0d..67e1a9a1a3 100644
--- a/caffe2/serialize/CMakeLists.txt
+++ b/caffe2/serialize/CMakeLists.txt
@@ -2,7 +2,6 @@ file(GLOB tmp *_test.cc)
@@ -128,10 +129,10 @@ index 1552b59..67e1a9a 100644
${CMAKE_CURRENT_SOURCE_DIR}/istream_adapter.cc
${CMAKE_CURRENT_SOURCE_DIR}/file_adapter.cc
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
-index f1f2eb7..b4d2033 100644
+index e78305e0a8..5b3c3d7bf2 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
-@@ -263,7 +263,7 @@ endif()
+@@ -270,7 +270,7 @@ endif()
# --- [ PocketFFT
set(AT_POCKETFFT_ENABLED 0)
if(NOT AT_MKL_ENABLED)
@@ -140,7 +141,7 @@ index f1f2eb7..b4d2033 100644
if(NOT EXISTS "${POCKETFFT_INCLUDE_DIR}")
message(FATAL_ERROR "pocketfft directory not found, expected ${POCKETFFT_INCLUDE_DIR}")
elif(NOT EXISTS "${POCKETFFT_INCLUDE_DIR}/pocketfft_hdronly.h")
-@@ -458,15 +458,6 @@ if(USE_PYTORCH_QNNPACK)
+@@ -465,15 +465,6 @@ if(USE_PYTORCH_QNNPACK)
set(PYTORCH_QNNPACK_BUILD_TESTS OFF CACHE BOOL "")
set(PYTORCH_QNNPACK_BUILD_BENCHMARKS OFF CACHE BOOL "")
set(PYTORCH_QNNPACK_LIBRARY_TYPE "static" CACHE STRING "")
@@ -156,7 +157,7 @@ index f1f2eb7..b4d2033 100644
if(PYTORCH_QNNPACK_CUSTOM_THREADPOOL)
target_compile_definitions(
-@@ -653,11 +644,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST)
+@@ -660,11 +651,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST)
# this shouldn't be necessary anymore.
get_property(INC_DIR_temp DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "")
@@ -168,7 +169,7 @@ index f1f2eb7..b4d2033 100644
# We will not need to test benchmark lib itself.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.")
-@@ -735,16 +721,6 @@ if(USE_FBGEMM)
+@@ -742,16 +728,6 @@ if(USE_FBGEMM)
if(USE_ASAN)
set(USE_SANITIZER "address,undefined" CACHE STRING "-fsanitize options for FBGEMM")
endif()
@@ -185,7 +186,7 @@ index f1f2eb7..b4d2033 100644
endif()
if(USE_FBGEMM)
-@@ -812,7 +788,7 @@ if(NOT TARGET fp16 AND NOT USE_SYSTEM_FP16)
+@@ -819,7 +795,7 @@ if(NOT TARGET fp16 AND NOT USE_SYSTEM_FP16)
"${FP16_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/FP16")
elseif(NOT TARGET fp16 AND USE_SYSTEM_FP16)
@@ -194,32 +195,24 @@ index f1f2eb7..b4d2033 100644
set_target_properties(fp16 PROPERTIES LINKER_LANGUAGE C)
endif()
list(APPEND Caffe2_DEPENDENCY_LIBS fp16)
-@@ -1159,7 +1135,6 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
+@@ -1161,7 +1137,6 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
# Tensorpipe uses cuda_add_library
torch_update_find_cuda_flags()
- add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)
list(APPEND Caffe2_DEPENDENCY_LIBS tensorpipe)
- if(USE_CUDA)
-@@ -1288,7 +1263,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
- set_target_properties(onnx_proto PROPERTIES CXX_STANDARD 17)
- endif()
- endif()
-- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL)
-
- add_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE})
- if(NOT USE_SYSTEM_ONNX)
-@@ -1319,7 +1293,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
+ list(APPEND Caffe2_DEPENDENCY_LIBS nlohmann)
+@@ -1317,7 +1292,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
endif()
set_property(TARGET onnx_proto PROPERTY IMPORTED_LOCATION ${ONNX_PROTO_LIBRARY})
message("-- Found onnx: ${ONNX_LIBRARY} ${ONNX_PROTO_LIBRARY}")
- list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx)
+ list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx onnx_optimizer)
endif()
- include_directories(${FOXI_INCLUDE_DIRS})
- list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader)
-@@ -1476,9 +1450,8 @@ if(NOT INTERN_BUILD_MOBILE)
+ # Recover the build shared libs option.
+ set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS})
+@@ -1465,9 +1440,8 @@ if(NOT INTERN_BUILD_MOBILE)
endif()
if(USE_MKLDNN)
include(${CMAKE_CURRENT_LIST_DIR}/public/mkldnn.cmake)
@@ -230,7 +223,7 @@ index f1f2eb7..b4d2033 100644
else()
message(WARNING "MKLDNN could not be found.")
caffe2_update_option(USE_MKLDNN OFF)
-@@ -1530,7 +1503,7 @@ endif()
+@@ -1519,7 +1493,7 @@ endif()
#
set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
@@ -239,7 +232,7 @@ index f1f2eb7..b4d2033 100644
# Disable compiler feature checks for `fmt`.
#
-@@ -1539,7 +1512,6 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
+@@ -1528,7 +1502,6 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
# CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know
# `fmt` is compatible with a superset of the compilers that PyTorch is, it
# shouldn't be too bad to just disable the c
This message was truncated. Download the full message here.
D
D
David Elsing wrote 2 days ago
[PATCH 11/11] gnu: python-pytorch-for-r-torch: Fix build.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-11-david.elsing@posteo.net
The build fails because the types of function pointers with return type
'__m256' and 'const __m256' (or '__m512' and 'const __m512') are not treated
as compatible by the compiler.

* gnu/packages/machine-learning.scm (python-pytorch-for-r-torch)
[arguments]: New field.
[inputs]: Add foxi.
---
gnu/packages/machine-learning.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7993e845a9..44f4936f0b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5061,11 +5061,23 @@ (define-public python-pytorch-for-r-torch
(name "python-pytorch")
(version %python-pytorch-for-r-torch-version)
(source %python-pytorch-for-r-torch-src)
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pytorch)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; See https://github.com/pytorch/pytorch/issues/61244
+ (add-after 'unpack 'fix-aten-vec
+ (lambda _
+ (substitute*
+ '("aten/src/ATen/cpu/vec/vec512/vec512_bfloat16.h"
+ "aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h")
+ (("map\\(const __") "map(__"))))))))
(native-inputs
(modify-inputs (package-native-inputs python-pytorch)
(replace "ideep-pytorch" ideep-pytorch-for-r-torch)))
(inputs
(modify-inputs (package-inputs python-pytorch)
+ (prepend foxi)
(prepend qnnpack)
(replace "qnnpack-pytorch" qnnpack-pytorch-for-r-torch)
(replace "oneapi-dnnl" oneapi-dnnl-for-r-torch)
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 06/11] gnu: Add pybind11-2.13.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-6-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (pybind11-2.13): New variable.
---
gnu/packages/python-xyz.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f5bcb41eba..b080f7865e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -153,7 +153,7 @@
;;; Copyright © 2024 Adriel Dumas--Jondeau <leirda@disroot.org>
;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2024 TakeV <takev@disroot.org>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Rick Huijzer <ikbenrickhuyzer@gmail.com>
;;; Copyright © 2024 Peter Kannewitz <petre-vps@posteo.net>
;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us@ieee.org>
@@ -29001,6 +29001,22 @@ (define-public pybind11
inferring type information using compile-time introspection.")
(license license:bsd-3)))
+;; Needed for python-optree
+(define-public pybind11-2.13
+ (package
+ (inherit pybind11)
+ (name "pybind11")
+ (version "2.13.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pybind/pybind11")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1dbnki0pnky39kr04afd9ks597bzjc530zbk33jjss53nfvdvlj8"))
+ (file-name (git-file-name name version))))))
+
;; Needed for scipy
(define-public pybind11-2.10
(package
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 09/11] gnu: oneapi-dnnl: Regenerate autogenerated files.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-9-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (oneapi-dnnl)[source]: Add snippet.
[arguments]<#:configure-flags>: Add "-DDNNL_EXPERIMENTAL_UKERNEL=ON".
[arguments]<#:phases>: Add 'codegen phase.
[native-inputs]: New field to add castxml, clang-17 and python.
---
gnu/packages/machine-learning.scm | 44 ++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 4 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 8ec29ce742..aa6cfc01f7 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -6160,11 +6160,47 @@ (define-public oneapi-dnnl
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))))
+ (base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))
+ (modules '((guix build utils)
+ (ice-9 rdelim)))
+ ;; Copyright date used by code generation script
+ (snippet
+ '(for-each
+ (lambda (file)
+ (with-atomic-file-replacement
+ file
+ (lambda (in out)
+ (let loop ((line (read-line in 'concat)))
+ (if (string-contains line "Copyright")
+ (display line out)
+ (loop (read-line in 'concat)))))))
+ '("include/oneapi/dnnl/dnnl_debug.h"
+ "src/common/dnnl_debug_autogenerated.cpp"
+ "tests/benchdnn/dnnl_debug_autogenerated.cpp"
+ "tests/benchdnn/dnnl_debug.hpp")))))
(build-system cmake-build-system)
- (arguments (if (target-riscv64?)
- (list #:configure-flags #~'("-DDNNL_CPU_RUNTIME=SEQ"))
- '()))
+ (arguments
+ (list
+ #:configure-flags
+ `(list
+ ,@(if (target-riscv64?)
+ (list #:configure-flags '("-DDNNL_CPU_RUNTIME=SEQ"))
+ '())
+ ;; Used in PyTorch
+ "-DDNNL_EXPERIMENTAL_UKERNEL=ON")
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'configure 'codegen
+ (lambda _
+ (with-directory-excursion "../source"
+ (invoke "castxml" "--castxml-cc-gnu-c" "clang"
+ "--castxml-output=1" "-DDNNL_EXPERIMENTAL_SPARSE"
+ "-Iinclude" "-I../build/include"
+ "include/oneapi/dnnl/dnnl_types.h" "-o" "types.xml")
+ (invoke "python3" "scripts/generate_dnnl_debug.py" "types.xml")
+ ;; Modifies include/oneapi/dnnl/dnnl.hpp
+ (invoke "python3" "scripts/generate_format_tags.py")))))))
+ (native-inputs (list castxml clang-17 python))
(home-page "https://github.com/oneapi-src/oneDNN")
(synopsis "Deep Neural Network Library")
(description
--
2.46.0
D
D
David Elsing wrote 2 days ago
[PATCH 07/11] gnu: python-optree: Update to 0.14.0.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250120233910.21233-7-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (python-optree): Update to 0.14.0.
[source]: Remove patch.
[arguments]<#:test-flags>: Disable additional failing test.
[native-inputs]: Replace pybind11 with pybind11-2.13 and cmake with
cmake-minimal.
* gnu/packages/patches/python-optree-fix-32-bit.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 3 +-
.../patches/python-optree-fix-32-bit.patch | 122 ------------------
gnu/packages/python-xyz.scm | 14 +-
3 files changed, 8 insertions(+), 131 deletions(-)
delete mode 100644 gnu/packages/patches/python-optree-fix-32-bit.patch

Toggle diff (192 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5091f93eb8..09a72d2418 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -64,7 +64,7 @@
# Copyright © 2023, 2024 gemmaro <gemmaro.dev@gmail.com>
# Copyright © 2023 Herman Rimm <herman@rimm.ee>
# Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
-# Copyright © 2024 David Elsing <david.elsing@posteo.net>
+# Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
# Copyright © 2024 Fabio Natali <me@fabionatali.com>
# Copyright © 2024 Noé Lopez <noelopez@free.fr>
@@ -2095,7 +2095,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \
%D%/packages/patches/python-hiredis-use-system-hiredis.patch \
%D%/packages/patches/python-online-judge-api-client-tests.patch \
- %D%/packages/patches/python-optree-fix-32-bit.patch \
%D%/packages/patches/python-pdoc3-tests.patch \
%D%/packages/patches/python-peachpy-determinism.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
diff --git a/gnu/packages/patches/python-optree-fix-32-bit.patch b/gnu/packages/patches/python-optree-fix-32-bit.patch
deleted file mode 100644
index 6a32c39bd8..0000000000
--- a/gnu/packages/patches/python-optree-fix-32-bit.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-In include/utils.h, ssize_t is an alias for py::ssize_t, which is an alias for
-Py_ssize_t in Python, which is an alias for the system ssize_t.
-The latter is defined in glibc as int if __WORDSIZE == 32 and as long int if
-__WORDSIZE == 64. Therefore, we need to remove the explicit template
-specialization for int in the first case.
-
-diff --git a/include/utils.h b/include/utils.h
-index 950a02b..82a9591 100644
---- a/include/utils.h
-+++ b/include/utils.h
-@@ -141,10 +141,12 @@ template <>
- inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const size_t& item) {
- return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const int& item) {
- return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#endif
- template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const ssize_t& item) {
- return PyList_GET_ITEM(container.ptr(), item);
-@@ -153,10 +155,12 @@ template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const size_t& item) {
- return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const int& item) {
- return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline py::object GET_ITEM_BORROW(const py::handle& container, const Item& item) {
-@@ -171,11 +175,13 @@ inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const
- return py::reinterpret_borrow<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const int& item) {
- return py::reinterpret_borrow<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
- template <>
- inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const ssize_t& item) {
- return py::reinterpret_borrow<py::object>(PyList_GET_ITEM(container.ptr(), item));
-@@ -185,11 +191,13 @@ inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const s
- return py::reinterpret_borrow<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const int& item) {
- return py::reinterpret_borrow<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline py::object GET_ITEM_STEAL(const py::handle& container, const Item& item) {
-@@ -204,11 +212,13 @@ inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const s
- return py::reinterpret_steal<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const int& item) {
- return py::reinterpret_steal<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
- template <>
- inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const ssize_t& item) {
- return py::reinterpret_steal<py::object>(PyList_GET_ITEM(container.ptr(), item));
-@@ -218,11 +228,13 @@ inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const si
- return py::reinterpret_steal<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const int& item) {
- return py::reinterpret_steal<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline void SET_ITEM(const py::handle& container, const Item& item, const py::handle& value) {
-@@ -240,12 +252,14 @@ inline void SET_ITEM<py::tuple>(const py::handle& container,
- const py::handle& value) {
- PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#if __WORDSIZE != 32
- template <>
- inline void SET_ITEM<py::tuple>(const py::handle& container,
- const int& item,
- const py::handle& value) {
- PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#endif
- template <>
- inline void SET_ITEM<py::list>(const py::handle& container,
- const ssize_t& item,
-@@ -258,12 +272,14 @@ inline void SET_ITEM<py::list>(const py::handle& container,
- const py::handle& value) {
- PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#if __WORDSIZE != 32
- template <>
- inline void SET_ITEM<py::list>(const py::handle& container,
- const int& item,
- const py::handle& value) {
- PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#endif
-
- template <typename PyType>
- inline void AssertExact(const py::handle& object) {
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b080f7865e..9f097a0caa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13175,7 +13175,7 @@ (define-public python-treelib
(define-public python-optree
(package
(name "python-optree")
- (version "0.11.0")
+ (version "0.14.0")
(source
(origin
(method git-fetch)
@@ -13185,21 +13185,21 @@ (define-public python-optree
(file-name (git-file-name name version))
(sha256
(base32
- "0sk5lm1xyxi7z0yjckip77qvbidyb7i1znmn9fz96q74hl9ffyan"))
- (patches (search-patches "python-optree-fix-32-bit.patch"))))
+ "17zph1jgzk0zaanj7057qj8x5cml8j66ip0xmlbwmq4396hmdlbs"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags
- ;; This test fails due to a circular import
- ''("-k" "not test_treespec_pickle_missing_registration")))
+ ;; These tests fails due to a circular import
+ '`("-k" ,(string-append "not test_treespec_pickle_missing_registration"
+ " and not test_import_no_warnings"))))
(propagated-inputs (list python-typing-extensions))
(native-inputs
(list python-pytest
python-setuptools
python-wheel
- cmake
- pybind11))
+ cmake-minimal
+ pybind11-2.13))
(home-page "https://github.com/metaopt/optree")
(synopsis "Optimized PyTree Utilities")
(description "This package contains operations on PyTrees (a tree made of
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 03/14] gnu: cpp-httplib: Update to 0.18.5.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-4-david.elsing@posteo.net
* gnu/packages/cpp.scm (cpp-httplib): Update to 0.18.5.
[native-inputs] Add curl.
---
gnu/packages/cpp.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 626118e2db..5e6dce637d 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1246,7 +1246,7 @@ (define-public cpp-httplib
;; header
(package
(name "cpp-httplib")
- (version "0.16.0")
+ (version "0.18.5")
(source
(origin
(method git-fetch)
@@ -1254,7 +1254,7 @@ (define-public cpp-httplib
(url "https://github.com/yhirose/cpp-httplib")
(commit (string-append "v" version))))
(sha256
- (base32 "0n4ribq7c6lqj0hn50pdvy7wml62fqbgrgysb038fq1qc6xyw3np"))
+ (base32 "1jc31n4xdrknal4i1dvf8j6j9kafpczi0w5gbbi89xlir9dgm5kp"))
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
@@ -1290,7 +1290,7 @@ (define-public cpp-httplib
"TooManyRedirectTest" "UrlWithSpace"
"YahooRedirectTest" "YahooRedirectTest")))))))
(native-inputs
- (list googletest python))
+ (list curl googletest python))
(inputs
(list brotli openssl zlib))
(home-page "https://github.com/yhirose/cpp-httplib")
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 01/14] gnu: asmjit: Update to commit cfc9f81.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-2-david.elsing@posteo.net
* gnu/packages/cpp.scm (asmjit): Update to commit cfc9f81.
---
gnu/packages/cpp.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 7f7c24dcde..626118e2db 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,7 +29,7 @@
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2022, 2023, 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2022-2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2022-2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
@@ -165,8 +165,8 @@ (define-public argagg
(license license:expat))))
(define-public asmjit
- (let ((commit "062e69ca81defa35eb0ee15f7412f49a0dad3cdb")
- (revision "1"))
+ (let ((commit "cfc9f813cc6ccda63cad872edb32b38e0662bedb")
+ (revision "2"))
(package
(name "asmjit")
(version (git-version "0.0.0" revision commit))
@@ -179,7 +179,7 @@ (define-public asmjit
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0lcwqzbv2628g3c7sflkwagyh49lp471px8bhg7lr77w9y94srqq"))))
+ (base32 "0lxkfg0b2bc2la0cvs5658a26mb00zlir4n0jkzzlg97l0jrbwpv"))))
(build-system cmake-build-system)
(arguments
(list #:configure-flags #~(list "-DASMJIT_TEST=TRUE")))
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 02/14] gnu: cpuinfo: Update to commit ca156f7.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-3-david.elsing@posteo.net
* gnu/packages/parallel.scm (cpuinfo): Update to commit ca156f7.
---
gnu/packages/parallel.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 0197891fb6..19da40fe98 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -13,7 +13,7 @@
;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -599,8 +599,8 @@ (define-public pthreadpool
(define-public cpuinfo
;; There's currently no tag on this repo.
(let ((version "0.0")
- (revision "3")
- (commit "05332fd802d9109a2a151ec32154b107c1e5caf9"))
+ (revision "4")
+ (commit "ca156f7bc9109c552973414a63d310f76ef0cbf8"))
(package
(name "cpuinfo")
(version (git-version version revision commit))
@@ -611,7 +611,7 @@ (define-public cpuinfo
(file-name (git-file-name name version))
(sha256
(base32
- "0w0kfc1fn9viirkhbr8dgfy9m5clfsg3k9p6kdxhzqpyjhgd252n"))))
+ "12ip6mnmymqhcbi8p98cn109y47pg9ygbj3k96r22dbmr77a50c4"))))
(build-system cmake-build-system)
(arguments
(list
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 00/14] Update PyTorch to 2.5.1
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-1-david.elsing@posteo.net
In the first version, I forgot to update fbgemm, python-torchvision and
python-pytorch-geometric.

David Elsing (14):
gnu: asmjit: Update to commit cfc9f81.
gnu: cpuinfo: Update to commit ca156f7.
gnu: cpp-httplib: Update to 0.18.5.
gnu: flatbuffers-next: Update to 24.12.23.
gnu: onnx: Update to 1.17.0.
gnu: Add pybind11-2.13.
gnu: python-optree: Update to 0.14.0.
gnu: python-sympy: Update to 1.13.3.
gnu: oneapi-dnnl: Regenerate autogenerated files.
gnu: fbgemm: Update to 1.0.0.
gnu: python-pytorch: Update to 2.5.1.
gnu: python-pytorch-for-r-torch: Fix build.
gnu: python-torchvision: Update to 0.20.1.
gnu: python-pytorch-geometric: Update to 2.6.1.

gnu/local.mk | 3 +-
gnu/packages/cpp.scm | 14 +-
gnu/packages/machine-learning.scm | 109 ++++++++++++----
gnu/packages/parallel.scm | 8 +-
.../patches/fbgemm-use-system-libraries.patch | 18 +--
.../patches/python-optree-fix-32-bit.patch | 122 ------------------
.../patches/python-pytorch-fix-codegen.patch | 42 +++---
.../python-pytorch-system-libraries.patch | 100 +++++++-------
gnu/packages/python-xyz.scm | 56 +++++---
gnu/packages/serialization.scm | 6 +-
10 files changed, 222 insertions(+), 256 deletions(-)
delete mode 100644 gnu/packages/patches/python-optree-fix-32-bit.patch

--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 04/14] gnu: flatbuffers-next: Update to 24.12.23.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-5-david.elsing@posteo.net
* gnu/packages/serialization.scm (flatbuffers-next): Update to 24.12.23.
---
gnu/packages/serialization.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 338682d16c..d9a9e240f9 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -20,7 +20,7 @@
;;; Copyright © 2024 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2024 Wilko Meyer <w@wmeyer.eu>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -946,7 +946,7 @@ (define-public flatbuffers-23.1
(define-public flatbuffers-next
(package
(inherit flatbuffers)
- (version "24.3.25")
+ (version "24.12.23")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -955,7 +955,7 @@ (define-public flatbuffers-next
(file-name (git-file-name "flatbuffers" version))
(sha256
(base32
- "0q066x1h0x9225aj25jv40gxgz46yvwmiqc2g6q06mkkg1144kxq"))))))
+ "01g64kmjw8dfhj12j5fgyx70avix9p1ml4w25lm726dixmpq9gp8"))))))
(define-public python-flatbuffers
(package
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 06/14] gnu: Add pybind11-2.13.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-7-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (pybind11-2.13): New variable.
---
gnu/packages/python-xyz.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1c4273b05d..0ecefa8df2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -153,7 +153,7 @@
;;; Copyright © 2024 Adriel Dumas--Jondeau <leirda@disroot.org>
;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2024 TakeV <takev@disroot.org>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Rick Huijzer <ikbenrickhuyzer@gmail.com>
;;; Copyright © 2024 Peter Kannewitz <petre-vps@posteo.net>
;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us@ieee.org>
@@ -29009,6 +29009,22 @@ (define-public pybind11
inferring type information using compile-time introspection.")
(license license:bsd-3)))
+;; Needed for python-optree
+(define-public pybind11-2.13
+ (package
+ (inherit pybind11)
+ (name "pybind11")
+ (version "2.13.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pybind/pybind11")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "1dbnki0pnky39kr04afd9ks597bzjc530zbk33jjss53nfvdvlj8"))
+ (file-name (git-file-name name version))))))
+
;; Needed for scipy
(define-public pybind11-2.10
(package
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 05/14] gnu: onnx: Update to 1.17.0.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-6-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (onnx): Update to 1.17.0.
---
gnu/packages/machine-learning.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 4d1d49553a..0b4d9638f0 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -27,7 +27,7 @@
;;; Copyright © 2024 David Pflug <david@pflug.io>
;;; Copyright © 2024 Timothee Mathieu <timothee.mathieu@inria.fr>
;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
-;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
;;; Copyright © 2024 Andy Tai <atai@atai.org>
;;;
;;; This file is part of GNU Guix.
@@ -1515,7 +1515,7 @@ (define (delete-ifdefs file)
(define-public onnx
(package
(name "onnx")
- (version "1.16.2")
+ (version "1.17.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1523,7 +1523,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "0f5h204ksfz4ir3qq38ckxja1jfhf1vn5xzwrj83vkkbfjq6fv16"))
+ "1i6bh4z2xzz1maykr0xmrwfybm6i3g38vnx7hsls8hr58rdr30zn"))
(file-name (git-file-name name version))
(patches (search-patches
"onnx-shared-libraries.patch"
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 08/14] gnu: python-sympy: Update to 1.13.3.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-9-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (python-sympy): Update to 1.13.3.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Adjust 'check phase.
[native-inputs]: New field to add python-hypothesis, python-pytest,
python-setuptools and python-wheel.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1f7ac3e069..9e389ed02e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -14963,24 +14963,28 @@ (define-public python-syllables
(define-public python-sympy
(package
(name "python-sympy")
- (version "1.11.1")
+ (version "1.13.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sympy" version))
(sha256
- (base32 "0n46x1rfy8c2a9za3yp2va5icigxj805f9fmiq8c1drwwvf808z3"))))
- (build-system python-build-system)
+ (base32 "1nf4zrjjbnv47n6sl6x9blfyarski61vdjaz4ygb62hfag3d4zxj"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
+ '(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke
- (or (which "python3") (which "python"))
- "-c" "import sympy; sympy.test(\"/core\")"))))))
- (propagated-inputs
- (list python-mpmath))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "python3" "-c"
+ "import sympy; sympy.test(\"/core\")")))))))
+ (propagated-inputs (list python-mpmath))
+ (native-inputs
+ (list python-hypothesis
+ python-pytest
+ python-setuptools
+ python-wheel))
(home-page "https://www.sympy.org/")
(synopsis "Python library for symbolic mathematics")
(description
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 07/14] gnu: python-optree: Update to 0.14.0.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-8-david.elsing@posteo.net
* gnu/packages/python-xyz.scm (python-optree): Update to 0.14.0.
[source]: Remove patch.
[arguments]<#:test-flags>: Disable additional failing test.
[native-inputs]: Replace pybind11 with pybind11-2.13 and cmake with
cmake-minimal.
* gnu/packages/patches/python-optree-fix-32-bit.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 3 +-
.../patches/python-optree-fix-32-bit.patch | 122 ------------------
gnu/packages/python-xyz.scm | 14 +-
3 files changed, 8 insertions(+), 131 deletions(-)
delete mode 100644 gnu/packages/patches/python-optree-fix-32-bit.patch

Toggle diff (192 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 5091f93eb8..09a72d2418 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -64,7 +64,7 @@
# Copyright © 2023, 2024 gemmaro <gemmaro.dev@gmail.com>
# Copyright © 2023 Herman Rimm <herman@rimm.ee>
# Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
-# Copyright © 2024 David Elsing <david.elsing@posteo.net>
+# Copyright © 2024, 2025 David Elsing <david.elsing@posteo.net>
# Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
# Copyright © 2024 Fabio Natali <me@fabionatali.com>
# Copyright © 2024 Noé Lopez <noelopez@free.fr>
@@ -2095,7 +2095,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \
%D%/packages/patches/python-hiredis-use-system-hiredis.patch \
%D%/packages/patches/python-online-judge-api-client-tests.patch \
- %D%/packages/patches/python-optree-fix-32-bit.patch \
%D%/packages/patches/python-pdoc3-tests.patch \
%D%/packages/patches/python-peachpy-determinism.patch \
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
diff --git a/gnu/packages/patches/python-optree-fix-32-bit.patch b/gnu/packages/patches/python-optree-fix-32-bit.patch
deleted file mode 100644
index 6a32c39bd8..0000000000
--- a/gnu/packages/patches/python-optree-fix-32-bit.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-In include/utils.h, ssize_t is an alias for py::ssize_t, which is an alias for
-Py_ssize_t in Python, which is an alias for the system ssize_t.
-The latter is defined in glibc as int if __WORDSIZE == 32 and as long int if
-__WORDSIZE == 64. Therefore, we need to remove the explicit template
-specialization for int in the first case.
-
-diff --git a/include/utils.h b/include/utils.h
-index 950a02b..82a9591 100644
---- a/include/utils.h
-+++ b/include/utils.h
-@@ -141,10 +141,12 @@ template <>
- inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const size_t& item) {
- return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const int& item) {
- return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#endif
- template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const ssize_t& item) {
- return PyList_GET_ITEM(container.ptr(), item);
-@@ -153,10 +155,12 @@ template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const size_t& item) {
- return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const int& item) {
- return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline py::object GET_ITEM_BORROW(const py::handle& container, const Item& item) {
-@@ -171,11 +175,13 @@ inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const
- return py::reinterpret_borrow<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const int& item) {
- return py::reinterpret_borrow<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
- template <>
- inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const ssize_t& item) {
- return py::reinterpret_borrow<py::object>(PyList_GET_ITEM(container.ptr(), item));
-@@ -185,11 +191,13 @@ inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const s
- return py::reinterpret_borrow<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const int& item) {
- return py::reinterpret_borrow<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline py::object GET_ITEM_STEAL(const py::handle& container, const Item& item) {
-@@ -204,11 +212,13 @@ inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const s
- return py::reinterpret_steal<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const int& item) {
- return py::reinterpret_steal<py::object>(
- PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
- template <>
- inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const ssize_t& item) {
- return py::reinterpret_steal<py::object>(PyList_GET_ITEM(container.ptr(), item));
-@@ -218,11 +228,13 @@ inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const si
- return py::reinterpret_steal<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#if __WORDSIZE != 32
- template <>
- inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const int& item) {
- return py::reinterpret_steal<py::object>(
- PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)));
- }
-+#endif
-
- template <typename Container, typename Item>
- inline void SET_ITEM(const py::handle& container, const Item& item, const py::handle& value) {
-@@ -240,12 +252,14 @@ inline void SET_ITEM<py::tuple>(const py::handle& container,
- const py::handle& value) {
- PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#if __WORDSIZE != 32
- template <>
- inline void SET_ITEM<py::tuple>(const py::handle& container,
- const int& item,
- const py::handle& value) {
- PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#endif
- template <>
- inline void SET_ITEM<py::list>(const py::handle& container,
- const ssize_t& item,
-@@ -258,12 +272,14 @@ inline void SET_ITEM<py::list>(const py::handle& container,
- const py::handle& value) {
- PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#if __WORDSIZE != 32
- template <>
- inline void SET_ITEM<py::list>(const py::handle& container,
- const int& item,
- const py::handle& value) {
- PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr());
- }
-+#endif
-
- template <typename PyType>
- inline void AssertExact(const py::handle& object) {
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0ecefa8df2..1f7ac3e069 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13177,7 +13177,7 @@ (define-public python-treelib
(define-public python-optree
(package
(name "python-optree")
- (version "0.11.0")
+ (version "0.14.0")
(source
(origin
(method git-fetch)
@@ -13187,21 +13187,21 @@ (define-public python-optree
(file-name (git-file-name name version))
(sha256
(base32
- "0sk5lm1xyxi7z0yjckip77qvbidyb7i1znmn9fz96q74hl9ffyan"))
- (patches (search-patches "python-optree-fix-32-bit.patch"))))
+ "17zph1jgzk0zaanj7057qj8x5cml8j66ip0xmlbwmq4396hmdlbs"))))
(build-system pyproject-build-system)
(arguments
(list
#:test-flags
- ;; This test fails due to a circular import
- ''("-k" "not test_treespec_pickle_missing_registration")))
+ ;; These tests fails due to a circular import
+ '`("-k" ,(string-append "not test_treespec_pickle_missing_registration"
+ " and not test_import_no_warnings"))))
(propagated-inputs (list python-typing-extensions))
(native-inputs
(list python-pytest
python-setuptools
python-wheel
- cmake
- pybind11))
+ cmake-minimal
+ pybind11-2.13))
(home-page "https://github.com/metaopt/optree")
(synopsis "Optimized PyTree Utilities")
(description "This package contains operations on PyTrees (a tree made of
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 09/14] gnu: oneapi-dnnl: Regenerate autogenerated files.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-10-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (oneapi-dnnl)[source]: Add snippet.
[arguments]<#:configure-flags>: Add "-DDNNL_EXPERIMENTAL_UKERNEL=ON".
[arguments]<#:phases>: Add 'codegen phase.
[native-inputs]: New field to add castxml, clang-17 and python.
---
gnu/packages/machine-learning.scm | 44 ++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 4 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 0b4d9638f0..cbeef84f06 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -6261,11 +6261,47 @@ (define-public oneapi-dnnl
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))))
+ (base32 "1m2d7qlbfk86rmvmpvx2k3rc2k0l9hf9qpa54jl44670ls9n8i7w"))
+ (modules '((guix build utils)
+ (ice-9 rdelim)))
+ ;; Copyright date used by code generation script
+ (snippet
+ '(for-each
+ (lambda (file)
+ (with-atomic-file-replacement
+ file
+ (lambda (in out)
+ (let loop ((line (read-line in 'concat)))
+ (if (string-contains line "Copyright")
+ (display line out)
+ (loop (read-line in 'concat)))))))
+ '("include/oneapi/dnnl/dnnl_debug.h"
+ "src/common/dnnl_debug_autogenerated.cpp"
+ "tests/benchdnn/dnnl_debug_autogenerated.cpp"
+ "tests/benchdnn/dnnl_debug.hpp")))))
(build-system cmake-build-system)
- (arguments (if (target-riscv64?)
- (list #:configure-flags #~'("-DDNNL_CPU_RUNTIME=SEQ"))
- '()))
+ (arguments
+ (list
+ #:configure-flags
+ `(list
+ ,@(if (target-riscv64?)
+ (list #:configure-flags '("-DDNNL_CPU_RUNTIME=SEQ"))
+ '())
+ ;; Used in PyTorch
+ "-DDNNL_EXPERIMENTAL_UKERNEL=ON")
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'configure 'codegen
+ (lambda _
+ (with-directory-excursion "../source"
+ (invoke "castxml" "--castxml-cc-gnu-c" "clang"
+ "--castxml-output=1" "-DDNNL_EXPERIMENTAL_SPARSE"
+ "-Iinclude" "-I../build/include"
+ "include/oneapi/dnnl/dnnl_types.h" "-o" "types.xml")
+ (invoke "python3" "scripts/generate_dnnl_debug.py" "types.xml")
+ ;; Modifies include/oneapi/dnnl/dnnl.hpp
+ (invoke "python3" "scripts/generate_format_tags.py")))))))
+ (native-inputs (list castxml clang-17 python))
(home-page "https://github.com/oneapi-src/oneDNN")
(synopsis "Deep Neural Network Library")
(description
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 10/14] gnu: fbgemm: Update to 1.0.0.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-11-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (fbgemm): Update to 1.0.0.
[arguments]: Add #:cmake.
* gnu/packages/patches/fbgemm-use-system-libraries.patch: Adjust patch.
---
gnu/packages/machine-learning.scm | 10 ++++------
.../patches/fbgemm-use-system-libraries.patch | 18 +++++++++---------
2 files changed, 13 insertions(+), 15 deletions(-)

Toggle diff (86 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index cbeef84f06..7e044f816f 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4539,7 +4539,7 @@ (define-public xnnpack-for-r-torch
(define-public fbgemm
(package
(name "fbgemm")
- (version "0.7.0")
+ (version "1.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -4548,14 +4548,12 @@ (define-public fbgemm
(file-name (git-file-name name version))
(sha256
(base32
- "1dzw9w82ca0hss1lvshix6piwsd0k11lyq9pzm8yg8k7j56hmyig"))
- (patches (search-patches "fbgemm-use-system-libraries.patch"))
- (modules '((guix build utils)))
- (snippet
- '(delete-file-recursively "third_party"))))
+ "1a5g5f32377fad99xsfggqkwvl7vh5gc1wj77swa06x06lc1qwyw"))
+ (patches (search-patches "fbgemm-use-system-libraries.patch"))))
(build-system cmake-build-system)
(arguments
(list
+ #:cmake cmake-3.30
#:configure-flags
''("-DFBGEMM_LIBRARY_TYPE=shared")
;; Tests require AVX2 or AVX-512 instructions
diff --git a/gnu/packages/patches/fbgemm-use-system-libraries.patch b/gnu/packages/patches/fbgemm-use-system-libraries.patch
index 456bc3021c..a799443f1d 100644
--- a/gnu/packages/patches/fbgemm-use-system-libraries.patch
+++ b/gnu/packages/patches/fbgemm-use-system-libraries.patch
@@ -1,19 +1,19 @@
Use the asmjit and cpuinfo packages.
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 134523e..b88b0e7 100644
+index 0243f686..f40dc408 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -235,7 +235,7 @@ message(WARNING "CMAKE_CXX_FLAGS_DEBUG is ${CMAKE_CXX_FLAGS_DEBUG}")
+@@ -247,7 +247,7 @@ message(WARNING "CMAKE_CXX_FLAGS_DEBUG is ${CMAKE_CXX_FLAGS_DEBUG}")
message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}")
message(WARNING "==========")
-if(NOT TARGET asmjit)
+if(FALSE)
- #Download asmjit from github if ASMJIT_SRC_DIR is not specified.
+ # Download asmjit from github if ASMJIT_SRC_DIR is not specified.
if(NOT DEFINED ASMJIT_SRC_DIR)
- set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit"
-@@ -264,7 +264,7 @@ if(NOT TARGET asmjit)
+ set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/external/asmjit"
+@@ -280,7 +280,7 @@ if(NOT TARGET asmjit)
endif()
endif()
@@ -21,8 +21,8 @@ index 134523e..b88b0e7 100644
+if(FALSE)
#Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
if(NOT DEFINED CPUINFO_SOURCE_DIR)
- set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo"
-@@ -340,9 +340,12 @@ target_include_directories(fbgemm BEFORE
+ set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/external/cpuinfo"
+@@ -367,9 +367,12 @@ target_include_directories(fbgemm BEFORE
target_link_libraries(fbgemm
$<BUILD_INTERFACE:asmjit>
$<BUILD_INTERFACE:cpuinfo>)
@@ -39,10 +39,10 @@ index 134523e..b88b0e7 100644
if(OpenMP_FOUND)
target_link_libraries(fbgemm OpenMP::OpenMP_CXX)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
-index 2cffddf..bd4d409 100644
+index da0be7fe..615f34ae 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
-@@ -14,7 +14,7 @@ set(CMAKE_C_STANDARD 11)
+@@ -14,7 +14,7 @@ set(CMAKE_C_STANDARD 17)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD_REQUIRED ON)
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 12/14] gnu: python-pytorch-for-r-torch: Fix build.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-13-david.elsing@posteo.net
The build fails because the types of function pointers with return type
'__m256' and 'const __m256' (or '__m512' and 'const __m512') are not treated
as compatible by the compiler.

* gnu/packages/machine-learning.scm (python-pytorch-for-r-torch)
[arguments]: New field.
[inputs]: Add foxi.
---
gnu/packages/machine-learning.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 2fcaea834f..e21736ab67 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5129,11 +5129,23 @@ (define-public python-pytorch-for-r-torch
(name "python-pytorch")
(version %python-pytorch-for-r-torch-version)
(source %python-pytorch-for-r-torch-src)
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pytorch)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; See https://github.com/pytorch/pytorch/issues/61244
+ (add-after 'unpack 'fix-aten-vec
+ (lambda _
+ (substitute*
+ '("aten/src/ATen/cpu/vec/vec512/vec512_bfloat16.h"
+ "aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h")
+ (("map\\(const __") "map(__"))))))))
(native-inputs
(modify-inputs (package-native-inputs python-pytorch)
(replace "ideep-pytorch" ideep-pytorch-for-r-torch)))
(inputs
(modify-inputs (package-inputs python-pytorch)
+ (prepend foxi)
(prepend qnnpack)
(replace "qnnpack-pytorch" qnnpack-pytorch-for-r-torch)
(replace "oneapi-dnnl" oneapi-dnnl-for-r-torch)
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 13/14] gnu: python-torchvision: Update to 0.20.1.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-14-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (python-torchvision): Update to 0.20.1.
[native-inputs]: Add pybind11.
---
gnu/packages/machine-learning.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e21736ab67..f646ba6e4e 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5551,7 +5551,7 @@ (define-public python-torchmetrics
(define-public python-torchvision
(package
(name "python-torchvision")
- (version "0.19.0")
+ (version "0.20.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5561,7 +5561,7 @@ (define-public python-torchvision
(file-name (git-file-name name version))
(sha256
(base32
- "15zyq2k4x9yapx7qfghhslznz1mwybhf086pirsr98c4l891sp1r"))
+ "1hxcpg44bjnfzqwihzbnfgd0gpkhfgqrcg116mnvdn0fpbhf4yq5"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -5593,7 +5593,11 @@ (define-public python-torchvision
python-pillow-simd
python-pytorch))
(native-inputs
- (list which python-pytest python-setuptools python-wheel))
+ (list pybind11
+ python-pytest
+ python-setuptools
+ python-wheel
+ which))
(home-page "https://pytorch.org/vision/stable/index.html")
(synopsis "Datasets, transforms and models specific to computer vision")
(description
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 14/14] gnu: python-pytorch-geometric: Update to 2.6.1.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-15-david.elsing@posteo.net
* gnu/packages/machine-learning.scm (python-pytorch-geometric): Update to 2.6.1.
[arguments]<#:phases>: Disable another test.
---
gnu/packages/machine-learning.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f646ba6e4e..e810698a96 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5161,7 +5161,7 @@ (define-public python-pytorch-for-r-torch
(define-public python-pytorch-geometric
(package
(name "python-pytorch-geometric")
- (version "2.4.0")
+ (version "2.6.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5170,7 +5170,7 @@ (define-public python-pytorch-geometric
(file-name (git-file-name name version))
(sha256
(base32
- "0hrs579asjsph16hyb4ablkbgfwd5j9y5s6ny7ahn3qrbkl2ji1g"))))
+ "0dbxz9d22vzm7fr9kgg66hj3sf8ag2ly8qky58cxvn1hyjl5h3v7"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -5184,6 +5184,8 @@ (define-public python-pytorch-geometric
;; These all fail with a size mismatch error such as
;; RuntimeError: shape '[-1, 2, 1, 1]' is invalid for input of size 3
"--ignore=test/explain/algorithm/test_captum_explainer.py"
+ ;; Requires the nonfree MKL on CPU.
+ "--ignore=test/nn/models/test_graph_unet.py"
"-k" (string-append
;; Permissions error
"not test_packaging"
--
2.46.0
D
D
David Elsing wrote 10 hours ago
[PATCH v2 11/14] gnu: python-pytorch: Update to 2.5.1.
(address . 75708@debbugs.gnu.org)(name . David Elsing)(address . david.elsing@posteo.net)
20250122183235.3472-12-david.elsing@posteo.net
This also updates the qnnpack-pytorch package.

* gnu/packages/machine-learning.scm (%python-pytorch-version): Set to 2.5.1.
(%python-pytorch-src): Adjust hash accordingly.
(python-pytorch)[arguments]<#:phases>: Add 'remove-fr-trace-script
phase. Adjust 'use-system-libraries phase.
[native-inputs]: Add nlohmann-json. Replace cmake with cmake-minimal.
[inputs]: Remove foxi.
* gnu/packages/patches/python-pytorch-fix-codegen.patch: Adjust patch.
* gnu/packages/patches/python-pytorch-system-libraries.patch: Adjust patch.
---
gnu/packages/machine-learning.scm | 21 +++-
.../patches/python-pytorch-fix-codegen.patch | 42 +++++---
.../python-pytorch-system-libraries.patch | 100 +++++++++---------
3 files changed, 90 insertions(+), 73 deletions(-)

Toggle diff (424 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 7e044f816f..2fcaea834f 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -4671,7 +4671,7 @@ (define-public ideep-pytorch-for-r-torch
(base32
"0hdpkhcjry22fjx2zg2r48v7f4ljrclzj0li2pgk76kvyblfbyvm"))))))
-(define %python-pytorch-version "2.4.0")
+(define %python-pytorch-version "2.5.1")
(define %python-pytorch-src
(origin
@@ -4682,7 +4682,7 @@ (define %python-pytorch-src
(file-name (git-file-name "python-pytorch" %python-pytorch-version))
(sha256
(base32
- "18hdhzr12brj0b7ppyiscax0dbra30207qx0cckw78midfkcn7cn"))
+ "052cvagpmm9y7jspjpcyysx8yc5fhxnjl8rcz6nndis06v8dcj8s"))
(patches (search-patches "python-pytorch-system-libraries.patch"
"python-pytorch-runpath.patch"
"python-pytorch-without-kineto.patch"
@@ -4828,6 +4828,14 @@ (define-public python-pytorch
(string-append #$output "/lib/python"
#$(version-major+minor (package-version python))
"/site-packages")))))
+ ;; This entry point is broken, because it refers to a module that is
+ ;; (intentionally) not installed
+ ;; (https://github.com/pytorch/pytorch/pull/134729), which causes
+ ;; the 'sanity-check phase to fail.
+ (add-after 'unpack 'remove-fr-trace-script
+ (lambda _
+ (substitute* "setup.py"
+ (("entry_points\\[\"console_scripts\"\\]\\.append\\(") "("))))
(add-before 'build 'use-system-libraries
(lambda _
(substitute* '("caffe2/serialize/crc.cc"
@@ -4865,7 +4873,10 @@ (define-public python-pytorch
(or (%current-target-system)
(%current-system))
(package-transitive-supported-systems qnnpack)))
- (setenv "USE_QNNPACK" "0"))))
+ (setenv "USE_QNNPACK" "0"))
+ (substitute* '("requirements.txt" "setup.py")
+ (("sympy==1\\.13\\.1")
+ "sympy>=1.13.1"))))
;; PyTorch is still built with AVX2 and AVX-512 support selected at
;; runtime, but these dependencies require it (nnpack only for
;; x86_64).
@@ -4966,10 +4977,11 @@ (define-public python-pytorch
;; Even only the core tests take a very long time to run.
#:tests? #f))
(native-inputs
- (list cmake
+ (list cmake-minimal
doxygen
ideep-pytorch
ninja
+ nlohmann-json
pocketfft-cpp
python-expecttest
python-pytest-flakefinder
@@ -4989,7 +5001,6 @@ (define-public python-pytorch
eigen
flatbuffers-next
fmt
- foxi
fp16
fxdiv
gemmlowp
diff --git a/gnu/packages/patches/python-pytorch-fix-codegen.patch b/gnu/packages/patches/python-pytorch-fix-codegen.patch
index b30094de09..106ea7db66 100644
--- a/gnu/packages/patches/python-pytorch-fix-codegen.patch
+++ b/gnu/packages/patches/python-pytorch-fix-codegen.patch
@@ -6,7 +6,7 @@ is later corrected. codegen_external.py is patched to avoid duplicate
functions and add the static keyword as in the existing generated file.
diff --git a/tools/gen_flatbuffers.sh b/tools/gen_flatbuffers.sh
-index cc0263d..ac34e84 100644
+index cc0263dbbf..ac34e84b82 100644
--- a/tools/gen_flatbuffers.sh
+++ b/tools/gen_flatbuffers.sh
@@ -1,13 +1,13 @@
@@ -32,7 +32,7 @@ index cc0263d..ac34e84 100644
-c "$ROOT/torch/csrc/jit/serialization/mobile_bytecode.fbs"
echo '// @generated' >> "$ROOT/torch/csrc/jit/serialization/mobile_bytecode_generated.h"
diff --git a/torch/csrc/jit/tensorexpr/codegen_external.py b/torch/csrc/jit/tensorexpr/codegen_external.py
-index 5dcf1b2..0e20b0c 100644
+index 5dcf1b2840..0e20b0c102 100644
--- a/torch/csrc/jit/tensorexpr/codegen_external.py
+++ b/torch/csrc/jit/tensorexpr/codegen_external.py
@@ -21,9 +21,14 @@ def gen_external(native_functions_path, tags_path, external_path):
@@ -61,7 +61,7 @@ index 5dcf1b2..0e20b0c 100644
void** buf_data,
int64_t* buf_ranks,
diff --git a/torchgen/decompositions/gen_jit_decompositions.py b/torchgen/decompositions/gen_jit_decompositions.py
-index 7a0024f..6b2445f 100644
+index b42948045c..e1cfc73a5e 100644
--- a/torchgen/decompositions/gen_jit_decompositions.py
+++ b/torchgen/decompositions/gen_jit_decompositions.py
@@ -1,8 +1,12 @@
@@ -76,9 +76,9 @@ index 7a0024f..6b2445f 100644
+else:
+ decomposition_table = {}
- # from torchgen.code_template import CodeTemplate
-@@ -85,7 +89,7 @@ def write_decomposition_util_file(path: str) -> None:
+ # from torchgen.code_template import CodeTemplate
+@@ -86,7 +90,7 @@ def write_decomposition_util_file(path: str) -> None:
def main() -> None:
@@ -88,27 +88,28 @@ index 7a0024f..6b2445f 100644
write_decomposition_util_file(str(upgrader_path))
diff --git a/torchgen/operator_versions/gen_mobile_upgraders.py b/torchgen/operator_versions/gen_mobile_upgraders.py
-index 2907076..6866332 100644
+index 362ce427d5..245056f815 100644
--- a/torchgen/operator_versions/gen_mobile_upgraders.py
+++ b/torchgen/operator_versions/gen_mobile_upgraders.py
-@@ -3,10 +3,12 @@ import os
+@@ -6,10 +6,13 @@ import os
from enum import Enum
from operator import itemgetter
from pathlib import Path
+import sys
- from typing import Any, Dict, List
+ from typing import Any
-import torch
-from torch.jit.generate_bytecode import generate_upgraders_bytecode
+if len(sys.argv) < 2 or sys.argv[1] != "dummy":
+ import torch
+ from torch.jit.generate_bytecode import generate_upgraders_bytecode
-
++
from torchgen.code_template import CodeTemplate
from torchgen.operator_versions.gen_mobile_upgraders_constant import (
-@@ -263,7 +265,10 @@ def construct_register_size(register_size_from_yaml: int) -> str:
+ MOBILE_UPGRADERS_HEADER_DESCRIPTION,
+@@ -265,7 +268,10 @@ def construct_register_size(register_size_from_yaml: int) -> str:
def construct_version_maps(
- upgrader_bytecode_function_to_index_map: Dict[str, Any]
+ upgrader_bytecode_function_to_index_map: dict[str, Any]
) -> str:
- version_map = torch._C._get_operator_version_map()
+ if len(sys.argv) < 2 or sys.argv[1] != "dummy":
@@ -118,7 +119,7 @@ index 2907076..6866332 100644
sorted_version_map_ = sorted(version_map.items(), key=itemgetter(0)) # type: ignore[no-any-return]
sorted_version_map = dict(sorted_version_map_)
-@@ -379,7 +384,10 @@ def sort_upgrader(upgrader_list: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
+@@ -381,7 +387,10 @@ def sort_upgrader(upgrader_list: list[dict[str, Any]]) -> list[dict[str, Any]]:
def main() -> None:
@@ -131,16 +132,24 @@ index 2907076..6866332 100644
for up in sorted_upgrader_list:
print("after sort upgrader : ", next(iter(up)))
diff --git a/torchgen/shape_functions/gen_jit_shape_functions.py b/torchgen/shape_functions/gen_jit_shape_functions.py
-index bdfd5c7..72b237a 100644
+index 56a3d8bf0d..490a3ea2e7 100644
--- a/torchgen/shape_functions/gen_jit_shape_functions.py
+++ b/torchgen/shape_functions/gen_jit_shape_functions.py
-@@ -18,16 +18,20 @@ you are in the root directory of the Pytorch git repo"""
+@@ -1,6 +1,7 @@
+ #!/usr/bin/env python3
+ import os
+ import sys
++import importlib
+ from importlib.util import module_from_spec, spec_from_file_location
+ from itertools import chain
+ from pathlib import Path
+@@ -18,16 +19,21 @@ you are in the root directory of the Pytorch git repo"""
if not file_path.exists():
raise Exception(err_msg) # noqa: TRY002
--spec = importlib.util.spec_from_file_location(module_name, file_path)
+-spec = spec_from_file_location(module_name, file_path)
-assert spec is not None
--module = importlib.util.module_from_spec(spec)
+-module = module_from_spec(spec)
-sys.modules[module_name] = module
-assert spec.loader is not None
-assert module is not None
@@ -159,6 +168,7 @@ index bdfd5c7..72b237a 100644
+
+ bounded_compute_graph_mapping = module.bounded_compute_graph_mapping
+ shape_compute_graph_mapping = module.shape_compute_graph_mapping
++
+else:
+ bounded_compute_graph_mapping = {}
+ shape_compute_graph_mapping = {}
diff --git a/gnu/packages/patches/python-pytorch-system-libraries.patch b/gnu/packages/patches/python-pytorch-system-libraries.patch
index 025b3241a1..6b3f36f3f0 100644
--- a/gnu/packages/patches/python-pytorch-system-libraries.patch
+++ b/gnu/packages/patches/python-pytorch-system-libraries.patch
@@ -5,10 +5,10 @@ httlib, ideep, miniz, nnpack, oneapi-dnnl, pocketfft, pthreadpool,
qnnpack-pytorch, tensorpipe, valgrind and xnnpack packages.
diff --git a/aten/src/ATen/CMakeLists.txt b/aten/src/ATen/CMakeLists.txt
-index 0087dd9..0235fa1 100644
+index 6d9152a4d0..97cb945722 100644
--- a/aten/src/ATen/CMakeLists.txt
+++ b/aten/src/ATen/CMakeLists.txt
-@@ -419,9 +419,9 @@ if(AT_NNPACK_ENABLED)
+@@ -414,9 +414,9 @@ if(AT_NNPACK_ENABLED)
list(APPEND ATen_CPU_DEPENDENCY_LIBS nnpack) # cpuinfo is added below
endif()
@@ -22,7 +22,7 @@ index 0087dd9..0235fa1 100644
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(s390x|ppc64le)$")
list(APPEND ATen_CPU_DEPENDENCY_LIBS cpuinfo)
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
-index 89c31fa..e6d9ef1 100644
+index 9be7f3732f..111215dacc 100644
--- a/caffe2/CMakeLists.txt
+++ b/caffe2/CMakeLists.txt
@@ -91,9 +91,6 @@ if(NOT MSVC AND USE_XNNPACK)
@@ -35,7 +35,7 @@ index 89c31fa..e6d9ef1 100644
endif()
endif()
-@@ -1075,7 +1072,6 @@ if(USE_XPU)
+@@ -1081,7 +1078,6 @@ if(USE_XPU)
endif()
if(NOT MSVC AND USE_XNNPACK)
@@ -43,17 +43,18 @@ index 89c31fa..e6d9ef1 100644
endif()
# ==========================================================
-@@ -1189,6 +1185,9 @@ endif()
+@@ -1195,8 +1191,8 @@ endif()
target_include_directories(torch_cpu PRIVATE
${TORCH_ROOT}/third_party/cpp-httplib)
+-target_include_directories(torch_cpu PRIVATE
+- ${TORCH_ROOT}/third_party/nlohmann/include)
+find_package(httplib REQUIRED)
+target_link_libraries(torch_cpu PUBLIC httplib::httplib)
-+
+
install(DIRECTORY "${TORCH_SRC_DIR}/csrc"
DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}/torch
- FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
-@@ -1417,6 +1416,7 @@ target_link_libraries(torch_cpu PUBLIC c10)
+@@ -1425,6 +1421,7 @@ target_link_libraries(torch_cpu PUBLIC c10)
target_link_libraries(torch_cpu PUBLIC ${Caffe2_PUBLIC_DEPENDENCY_LIBS})
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_LIBS})
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_WHOLE_LINK_LIBS})
@@ -61,7 +62,7 @@ index 89c31fa..e6d9ef1 100644
if(USE_MPI)
target_link_libraries(torch_cpu PRIVATE MPI::MPI_CXX)
endif()
-@@ -1694,7 +1694,7 @@ if(BUILD_STATIC_RUNTIME_BENCHMARK)
+@@ -1659,7 +1656,7 @@ if(BUILD_STATIC_RUNTIME_BENCHMARK)
add_executable(static_runtime_bench "${STATIC_RUNTIME_BENCHMARK_SRCS}")
add_executable(static_runtime_test "${STATIC_RUNTIME_TEST_SRCS}")
target_link_libraries(static_runtime_bench torch_library benchmark)
@@ -70,7 +71,7 @@ index 89c31fa..e6d9ef1 100644
endif()
if(BUILD_MOBILE_BENCHMARK)
-@@ -1713,7 +1713,7 @@ if(BUILD_MOBILE_TEST)
+@@ -1678,7 +1675,7 @@ if(BUILD_MOBILE_TEST)
foreach(test_src ${ATen_MOBILE_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -79,16 +80,16 @@ index 89c31fa..e6d9ef1 100644
target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
target_include_directories(${test_name} PRIVATE ${ATen_CPU_INCLUDE})
-@@ -1734,7 +1734,7 @@ if(BUILD_TEST)
+@@ -1699,7 +1696,7 @@ if(BUILD_TEST)
if(NOT MSVC)
add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}" ../aten/src/ATen/native/quantized/AffineQuantizerBase.cpp)
# TODO: Get rid of c10 dependency (which is only needed for the implementation of AT_ERROR)
-- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main)
-+ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest)
+- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main nlohmann)
++ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main gtest nlohmann)
if(USE_FBGEMM)
target_link_libraries(${test_name}_${CPU_CAPABILITY} fbgemm)
endif()
-@@ -1748,7 +1748,7 @@ if(BUILD_TEST)
+@@ -1713,7 +1710,7 @@ if(BUILD_TEST)
endif()
else()
add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}")
@@ -97,7 +98,7 @@ index 89c31fa..e6d9ef1 100644
endif()
target_include_directories(${test_name}_${CPU_CAPABILITY} PRIVATE $<INSTALL_INTERFACE:include>)
target_include_directories(${test_name}_${CPU_CAPABILITY} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
-@@ -1765,7 +1765,7 @@ if(BUILD_TEST)
+@@ -1730,7 +1727,7 @@ if(BUILD_TEST)
foreach(test_src ${Caffe2_CPU_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -106,7 +107,7 @@ index 89c31fa..e6d9ef1 100644
if(NOT MSVC)
target_link_libraries(${test_name} stdc++)
endif()
-@@ -1845,7 +1845,7 @@ if(BUILD_TEST)
+@@ -1810,7 +1807,7 @@ if(BUILD_TEST)
foreach(test_src ${Caffe2_VULKAN_TEST_SRCS})
get_filename_component(test_name ${test_src} NAME_WE)
add_executable(${test_name} "${test_src}")
@@ -116,7 +117,7 @@ index 89c31fa..e6d9ef1 100644
target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>)
diff --git a/caffe2/serialize/CMakeLists.txt b/caffe2/serialize/CMakeLists.txt
-index 1552b59..67e1a9a 100644
+index 1552b59d0d..67e1a9a1a3 100644
--- a/caffe2/serialize/CMakeLists.txt
+++ b/caffe2/serialize/CMakeLists.txt
@@ -2,7 +2,6 @@ file(GLOB tmp *_test.cc)
@@ -128,10 +129,10 @@ index 1552b59..67e1a9a 100644
${CMAKE_CURRENT_SOURCE_DIR}/istream_adapter.cc
${CMAKE_CURRENT_SOURCE_DIR}/file_adapter.cc
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
-index f1f2eb7..b4d2033 100644
+index e78305e0a8..5b3c3d7bf2 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
-@@ -263,7 +263,7 @@ endif()
+@@ -270,7 +270,7 @@ endif()
# --- [ PocketFFT
set(AT_POCKETFFT_ENABLED 0)
if(NOT AT_MKL_ENABLED)
@@ -140,7 +141,7 @@ index f1f2eb7..b4d2033 100644
if(NOT EXISTS "${POCKETFFT_INCLUDE_DIR}")
message(FATAL_ERROR "pocketfft directory not found, expected ${POCKETFFT_INCLUDE_DIR}")
elif(NOT EXISTS "${POCKETFFT_INCLUDE_DIR}/pocketfft_hdronly.h")
-@@ -458,15 +458,6 @@ if(USE_PYTORCH_QNNPACK)
+@@ -465,15 +465,6 @@ if(USE_PYTORCH_QNNPACK)
set(PYTORCH_QNNPACK_BUILD_TESTS OFF CACHE BOOL "")
set(PYTORCH_QNNPACK_BUILD_BENCHMARKS OFF CACHE BOOL "")
set(PYTORCH_QNNPACK_LIBRARY_TYPE "static" CACHE STRING "")
@@ -156,7 +157,7 @@ index f1f2eb7..b4d2033 100644
if(PYTORCH_QNNPACK_CUSTOM_THREADPOOL)
target_compile_definitions(
-@@ -653,11 +644,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST)
+@@ -660,11 +651,6 @@ if(BUILD_TEST OR BUILD_MOBILE_BENCHMARK OR BUILD_MOBILE_TEST)
# this shouldn't be necessary anymore.
get_property(INC_DIR_temp DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "")
@@ -168,7 +169,7 @@ index f1f2eb7..b4d2033 100644
# We will not need to test benchmark lib itself.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable benchmark testing as we don't need it.")
-@@ -735,16 +721,6 @@ if(USE_FBGEMM)
+@@ -742,16 +728,6 @@ if(USE_FBGEMM)
if(USE_ASAN)
set(USE_SANITIZER "address,undefined" CACHE STRING "-fsanitize options for FBGEMM")
endif()
@@ -185,7 +186,7 @@ index f1f2eb7..b4d2033 100644
endif()
if(USE_FBGEMM)
-@@ -812,7 +788,7 @@ if(NOT TARGET fp16 AND NOT USE_SYSTEM_FP16)
+@@ -819,7 +795,7 @@ if(NOT TARGET fp16 AND NOT USE_SYSTEM_FP16)
"${FP16_SOURCE_DIR}"
"${CONFU_DEPENDENCIES_BINARY_DIR}/FP16")
elseif(NOT TARGET fp16 AND USE_SYSTEM_FP16)
@@ -194,32 +195,24 @@ index f1f2eb7..b4d2033 100644
set_target_properties(fp16 PROPERTIES LINKER_LANGUAGE C)
endif()
list(APPEND Caffe2_DEPENDENCY_LIBS fp16)
-@@ -1159,7 +1135,6 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
+@@ -1161,7 +1137,6 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE)
# Tensorpipe uses cuda_add_library
torch_update_find_cuda_flags()
- add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/tensorpipe)
list(APPEND Caffe2_DEPENDENCY_LIBS tensorpipe)
- if(USE_CUDA)
-@@ -1288,7 +1263,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
- set_target_properties(onnx_proto PROPERTIES CXX_STANDARD 17)
- endif()
- endif()
-- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL)
-
- add_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE})
- if(NOT USE_SYSTEM_ONNX)
-@@ -1319,7 +1293,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
+ list(APPEND Caffe2_DEPENDENCY_LIBS nlohmann)
+@@ -1317,7 +1292,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
endif()
set_property(TARGET onnx_proto PROPERTY IMPORTED_LOCATION ${ONNX_PROTO_LIBRARY})
message("-- Found onnx: ${ONNX_LIBRARY} ${ONNX_PROTO_LIBRARY}")
- list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx)
+ list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx onnx_optimizer)
endif()
- include_directories(${FOXI_INCLUDE_DIRS})
- list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader)
-@@ -1476,9 +1450,8 @@ if(NOT INTERN_BUILD_MOBILE)
+ # Recover the build shared libs option.
+ set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS})
+@@ -1465,9 +1440,8 @@ if(NOT INTERN_BUILD_MOBILE)
endif()
if(USE_MKLDNN)
include(${CMAKE_CURRENT_LIST_DIR}/public/mkldnn.cmake)
@@ -230,7 +223,7 @@ index f1f2eb7..b4d2033 100644
else()
message(WARNING "MKLDNN could not be found.")
caffe2_update_option(USE_MKLDNN OFF)
-@@ -1530,7 +1503,7 @@ endif()
+@@ -1519,7 +1493,7 @@ endif()
#
set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
@@ -239,7 +232,7 @@ index f1f2eb7..b4d2033 100644
# Disable compiler feature checks for `fmt`.
#
-@@ -1539,7 +1512,6 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
+@@ -1528,7 +1502,6 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
# CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know
# `fmt` is compatible with a superset of the compilers that PyTorch is, it
# shouldn't be too bad to just disable the c
This message was truncated. Download the full message here.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75708@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75708
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch