[PATCH] gnu: onnx: Update to 1.14.1

  • Open
  • quality assurance status badge
Details
3 participants
  • Andy Tai
  • Ludovic Courtès
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Andy Tai
Severity
normal
Merged with
A
A
Andy Tai wrote on 30 Aug 2023 18:40
(name . Andy Tai)(address . atai@atai.org)
a5f1270005a0be3f958485d2395f0238a4eeb757.1693413551.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 8 +++++---
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
gnu/packages/patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 12 insertions(+), 12 deletions(-)

Toggle diff (85 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ca7ca0ff09..267033ef56 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW" ; honor packagename_ROOT defines
+ (string-append "-DGTest_ROOT="
+ (assoc-ref %build-inputs "googletest"))
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})

base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
--
2.41.0
A
A
Andy Tai wrote on 30 Aug 2023 19:06
[PATCH v2] gnu: onnx: Update to 1.14.1
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
5bf5b37e1a443ec05011f7acef4a3b96b88b70be.1693415134.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 9 ++++++---
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
gnu/packages/patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 13 insertions(+), 12 deletions(-)

Toggle diff (86 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index ca7ca0ff09..626afeb030 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,10 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DCMAKE_POLICY_DEFAULT_CMP0074=NEW"
+ ; honor packagename_ROOT defines
+ (string-append "-DGTest_ROOT="
+ (assoc-ref %build-inputs "googletest"))
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})

base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
--
2.41.0
A
A
Andy Tai wrote on 3 Sep 2023 02:31
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
CAJsg1E9NmyNyvKgJToQDWDCG-N_jD0W1-Litu6mjksvyRoakjg@mail.gmail.com
block 65650 by 65630
A
A
Andy Tai wrote on 3 Sep 2023 05:44
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
0293efc03e0aba3e3ae0268062ed37639433fc1e.1693712577.git.atai@atai.org
* gnu/packages/protobuf.scm (python-protobuf): Update to 3.20.3
---
gnu/packages/protobuf.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 8cd805799e..dc3ba72ee1 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -425,14 +425,14 @@ (define-public python-nanopb
(define-public python-protobuf
(package
(name "python-protobuf")
- (version "3.20.1")
+ (version "3.20.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "protobuf" version))
(sha256
(base32
- "1ja2vpk9nklllmsirmil2s4l7ni9yfqvbvj47zz5xx17s1k1bhxd"))))
+ "1wh5f4rnzbv46xy1rx62cprhg5hqf2py06s9b7rfpzwwki12fd1f"))))
(build-system python-build-system)
(inputs (list protobuf))
(arguments

base-commit: 4818ad5ba204e094fd8995c90c16ee1940e76210
--
2.41.0
A
A
Andy Tai wrote on 3 Sep 2023 05:44
[PATCH v2 2/2] gnu: onnx: Update to 1.14.1
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
049b3335f4196044edf950e48a0f6f370878426e.1693712577.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 12 ++++++++----
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
.../patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 15 insertions(+), 13 deletions(-)

Toggle diff (97 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 53778114eb..d8d99addd1 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1025,7 +1025,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1033,7 +1033,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1059,7 +1059,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ ; force system copy use;
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
@@ -1090,10 +1092,12 @@ (define-public onnx
pybind11
python-coverage
python-nbval
+ python-parameterized
+ python-protobuf
python-pytest
python-pytest-runner))
(inputs
- (list protobuf))
+ (list protobuf ))
(propagated-inputs
(list python-numpy python-protobuf python-six python-tabulate
python-typing-extensions))
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
--
2.41.0
L
L
Ludovic Courtès wrote on 9 Sep 2023 15:42
Re: bug#65630: [PATCH] gnu: onnx: Update to 1.14.1
(name . Andy Tai)(address . atai@atai.org)(address . 65630@debbugs.gnu.org)
87edj7xy2b.fsf_-_@gnu.org
Hi Andy,

This apparently causes 30 failures on x86_64-linux:


Could you take a look?

TIA,
Ludo’.
A
A
Andy Tai wrote on 9 Sep 2023 19:53
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 65630@debbugs.gnu.org)
CAJsg1E8=q5ALrz=UXYvpfpgsaa4j3ywuHYVX+kS=8EuuRZb4hg@mail.gmail.com
Sure.
On Sat, Sep 9, 2023 at 6:42?AM Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (11 lines)
>
> Hi Andy,
>
> This apparently causes 30 failures on x86_64-linux:
>
> https://qa.guix.gnu.org/issue/65630
>
> Could you take a look?
>
> TIA,
> Ludo’.
--
Andy Tai, atai@atai.org, Skype: licheng.tai, Line: andy_tai, WeChat: andytai1010
Year 2023 ??112?
????????????
????????????
A
A
Andy Tai wrote on 10 Sep 2023 22:01
[PATCH v3 2/4] gnu: onnx: Update to 1.14.1
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
de14e30c24a0621443d35986d1ecd233f4212cf8.1694375976.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx): Update to 1.14.1
* gnu/packages/patches/onnx-skip-model-downloads.patch: Adjust to onnx 1.14.1
* gnu/packages/patches/onnx-use-system-googletest.patch: Adjust to onnx 1.14.1
---
gnu/packages/machine-learning.scm | 12 ++++++++----
gnu/packages/patches/onnx-skip-model-downloads.patch | 8 ++++----
.../patches/onnx-use-system-googletest.patch | 8 +++-----
3 files changed, 15 insertions(+), 13 deletions(-)

Toggle diff (97 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index fd0be8d500..c1f5925b11 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1061,7 +1061,7 @@ (define-public shogun
(define-public onnx
(package
(name "onnx")
- (version "1.12.0")
+ (version "1.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1069,7 +1069,7 @@ (define-public onnx
(commit (string-append "v" version))))
(sha256
(base32
- "1g9f1hviksbn7gi6fnd0dsm7nf0w3yia0mjj33d9mggklrl0db6x"))
+ "1lg67z5kzky5qmfcll6dg9pkbdric4d2zwxs89ljc0nyla9rsm35"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-use-system-googletest.patch"
"onnx-shared-libraries.patch"
@@ -1095,7 +1095,9 @@ (define-public onnx
(string-append "-DCMAKE_INSTALL_RPATH=" out
"/lib")
"-DCMAKE_VERBOSE_MAKEFILE=ON"
-
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ ; force system copy use;
"-DBUILD_SHARED_LIBS=ON"))
;; This environment variable is honored by 'setup.py',
@@ -1126,10 +1128,12 @@ (define-public onnx
pybind11
python-coverage
python-nbval
+ python-parameterized
+ python-protobuf
python-pytest
python-pytest-runner))
(inputs
- (list protobuf))
+ (list protobuf ))
(propagated-inputs
(list python-numpy python-protobuf python-six python-tabulate
python-typing-extensions))
diff --git a/gnu/packages/patches/onnx-skip-model-downloads.patch b/gnu/packages/patches/onnx-skip-model-downloads.patch
index 4ab55b4ceb..e96f4cb7d9 100644
--- a/gnu/packages/patches/onnx-skip-model-downloads.patch
+++ b/gnu/packages/patches/onnx-skip-model-downloads.patch
@@ -6,10 +6,10 @@ diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__i
index 049ed57b..f236f1bf 100644
--- a/onnx/backend/test/runner/__init__.py
+++ b/onnx/backend/test/runner/__init__.py
-@@ -202,6 +202,7 @@ class Runner(object):
- print('Start downloading model {} from {}'.format(
- model_test.model_name,
- model_test.url))
+@@ -227,6 +227,7 @@ class Runner(object):
+ print(
+ f"Start downloading model {model_test.model_name} from {model_test.url}"
+ )
+ raise unittest.SkipTest('Skipping download')
urlretrieve(model_test.url, download_file.name)
print('Done')
diff --git a/gnu/packages/patches/onnx-use-system-googletest.patch b/gnu/packages/patches/onnx-use-system-googletest.patch
index 5dfcbc6dc3..4279ea37c6 100644
--- a/gnu/packages/patches/onnx-use-system-googletest.patch
+++ b/gnu/packages/patches/onnx-use-system-googletest.patch
@@ -28,21 +28,19 @@ index 0aa9fda2..a573170c 100644
if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf))
diff --git a/cmake/unittest.cmake b/cmake/unittest.cmake
-index e29a93ff..ae146390 100644
+index e71b92a7..30c446ce 100644
--- a/cmake/unittest.cmake
+++ b/cmake/unittest.cmake
-@@ -6,8 +6,8 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
+@@ -7,7 +7,7 @@ include(${ONNX_ROOT}/cmake/Utils.cmake)
find_package(Threads)
-set(${UT_NAME}_libs ${googletest_STATIC_LIBRARIES})
--set(${ONNXIFI_TEST_DRIVER}_libs ${googletest_STATIC_LIBRARIES})
+set(${UT_NAME}_libs ${GTEST_LIBRARIES})
-+set(${ONNXIFI_TEST_DRIVER}_libs ${GTEST_LIBRARIES})
list(APPEND ${UT_NAME}_libs onnx)
list(APPEND ${UT_NAME}_libs onnx_proto)
-@@ -31,10 +31,10 @@ function(AddTest)
+@@ -22,10 +22,10 @@ function(AddTest)
list(REMOVE_DUPLICATES _UT_SOURCES)
add_executable(${_UT_TARGET} ${_UT_SOURCES})
--
2.41.0
A
A
Andy Tai wrote on 10 Sep 2023 22:01
[PATCH v3 3/4] gnu: onnx: Use G-Expressions.
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
fd00927eff034ac9fad34ddea933b35a46afa179.1694375976.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx)[arguments]: Convert to list of G-Expressions.
---
gnu/packages/machine-learning.scm | 88 ++++++++++++++++---------------
1 file changed, 45 insertions(+), 43 deletions(-)

Toggle diff (102 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index c1f5925b11..3c26eb4e64 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1078,50 +1078,52 @@ (define-public onnx
(snippet '(delete-file-recursively "third_party"))))
(build-system python-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-before 'build 'pass-cmake-arguments
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Pass options to the CMake-based build process.
- (define out
- (assoc-ref outputs "out"))
-
- (define args
- ;; Copy arguments from 'cmake-build-system', plus ask
- ;; for shared libraries.
- (list "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
- (string-append "-DCMAKE_INSTALL_PREFIX=" out)
- "-DCMAKE_INSTALL_LIBDIR=lib"
- "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
- (string-append "-DCMAKE_INSTALL_RPATH=" out
- "/lib")
- "-DCMAKE_VERBOSE_MAKEFILE=ON"
- "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
- "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'pass-cmake-arguments
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Pass options to the CMake-based build process.
+ (define out
+ (assoc-ref outputs "out"))
+
+ (define args
+ ;; Copy arguments from 'cmake-build-system', plus ask
+ ;; for shared libraries.
+ (list "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
+ (string-append "-DCMAKE_INSTALL_PREFIX=" out)
+ "-DCMAKE_INSTALL_LIBDIR=lib"
+ "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
+ (string-append "-DCMAKE_INSTALL_RPATH=" out
+ "/lib")
+ "-DCMAKE_VERBOSE_MAKEFILE=ON"
+ "-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
+ "-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
; force system copy use;
- "-DBUILD_SHARED_LIBS=ON"))
-
- ;; This environment variable is honored by 'setup.py',
- ;; which passes it down to 'cmake'.
- (setenv "CMAKE_ARGS" (string-join args))
-
- ;; This one is honored by 'setup.py' and passed to 'make
- ;; -j'.
- (setenv "MAX_JOBS"
- (number->string (parallel-job-count)))))
- (add-before 'check 'make-test-directory-writable
- (lambda _
- ;; Make things writable for tests.
- (setenv "HOME" (getcwd))
- (for-each make-file-writable
- (find-files "onnx/examples" "."
- #:directories? #t))))
- (add-after 'install 'install-from-cmake
- (lambda _
- ;; Run "make install" in the build tree 'setup.py'
- ;; created for CMake so that libonnx.so,
- ;; libonnx_proto.so, etc. are installed.
- (invoke "make" "install"
- "-C" ".setuptools-cmake-build"))))))
+ "-DBUILD_SHARED_LIBS=ON"))
+
+ ;; This environment variable is honored by 'setup.py',
+ ;; which passes it down to 'cmake'.
+ (setenv "CMAKE_ARGS"
+ (string-join args))
+
+ ;; This one is honored by 'setup.py' and passed to 'make
+ ;; -j'.
+ (setenv "MAX_JOBS"
+ (number->string (parallel-job-count)))))
+ (add-before 'check 'make-test-directory-writable
+ (lambda _
+ ;; Make things writable for tests.
+ (setenv "HOME"
+ (getcwd))
+ (for-each make-file-writable
+ (find-files "onnx/examples" "."
+ #:directories? #t))))
+ (add-after 'install 'install-from-cmake
+ (lambda _
+ ;; Run "make install" in the build tree 'setup.py'
+ ;; created for CMake so that libonnx.so,
+ ;; libonnx_proto.so, etc. are installed.
+ (invoke "make" "install" "-C"
+ ".setuptools-cmake-build"))))))
(native-inputs
(list cmake
googletest
--
2.41.0
A
A
Andy Tai wrote on 10 Sep 2023 22:01
[PATCH v3 1/4] gnu: python-protobuf: Update to 3.20.3
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
e118be2a4cca96322298560791afc5434f4c2927.1694375976.git.atai@atai.org
* gnu/packages/protobuf.scm (python-protobuf): Update to 3.20.3
---
gnu/packages/protobuf.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm
index 8cd805799e..dc3ba72ee1 100644
--- a/gnu/packages/protobuf.scm
+++ b/gnu/packages/protobuf.scm
@@ -425,14 +425,14 @@ (define-public python-nanopb
(define-public python-protobuf
(package
(name "python-protobuf")
- (version "3.20.1")
+ (version "3.20.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "protobuf" version))
(sha256
(base32
- "1ja2vpk9nklllmsirmil2s4l7ni9yfqvbvj47zz5xx17s1k1bhxd"))))
+ "1wh5f4rnzbv46xy1rx62cprhg5hqf2py06s9b7rfpzwwki12fd1f"))))
(build-system python-build-system)
(inputs (list protobuf))
(arguments

base-commit: 5db78e7c1b06d1b4892bdb3e153b95b21577271e
--
2.41.0
A
A
Andy Tai wrote on 10 Sep 2023 22:01
[PATCH v3 4/4] gnu: onnx-optimizer: Update to 0.3.17
(address . 65630@debbugs.gnu.org)(name . Andy Tai)(address . atai@atai.org)
298ff69fb8f8e7501dd2f2d0eebc9d40405e2ac6.1694375976.git.atai@atai.org
* gnu/packages/machine-learning.scm (onnx-optimizer): Update to 0.3.17
* gnu/packages/patches/onnx-optimizer-system-library.patch:
Adapt to onnx-optimizer 0.3.17
---
gnu/packages/machine-learning.scm | 12 +++--
.../onnx-optimizer-system-library.patch | 48 +++++++++++--------
2 files changed, 36 insertions(+), 24 deletions(-)

Toggle diff (121 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 3c26eb4e64..dfba9f666a 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1098,8 +1098,10 @@ (define-public onnx
"-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
"-DONNX_OPT_USE_SYSTEM_PROTOBUF=ON"
; force system copy use;
- "-DBUILD_SHARED_LIBS=ON"))
-
+ "-DBUILD_SHARED_LIBS=ON"
+ (string-append "-DONNX_ROOT="
+ #$(package-source this-package))))
+ ;; for derived package use
;; This environment variable is honored by 'setup.py',
;; which passes it down to 'cmake'.
(setenv "CMAKE_ARGS"
@@ -1157,8 +1159,8 @@ (define-public python-onnx
(define-public onnx-optimizer
(package
(name "onnx-optimizer")
- ;; Note: 0.2.x is *more* recent than 1.5.0.
- (version "0.2.6")
+ ;; Note: 0.2.x or 0.3.x is *more* recent than 1.5.0.
+ (version "0.3.17")
(home-page "https://github.com/onnx/optimizer")
(source (origin
(method git-fetch)
@@ -1167,7 +1169,7 @@ (define-public onnx-optimizer
(commit (string-append "v" version))))
(sha256
(base32
- "1wkqqdxcxpfbf8zpbdfdd3zz5jkw775g31gyykj11z4y6pp659l6"))
+ "0j8civ0vf2vxyk5ihb9zxvwsqv8yzbfmkg42rnxwf59gdzgz48li"))
(file-name (git-file-name name version))
(patches (search-patches "onnx-optimizer-system-library.patch"))
(modules '((guix build utils)))
diff --git a/gnu/packages/patches/onnx-optimizer-system-library.patch b/gnu/packages/patches/onnx-optimizer-system-library.patch
index 5c592597e0..7890bee045 100644
--- a/gnu/packages/patches/onnx-optimizer-system-library.patch
+++ b/gnu/packages/patches/onnx-optimizer-system-library.patch
@@ -1,42 +1,42 @@
-Arrange so that onnx-optimizer (1) uses our own ONNX build,
+Arrange so that onnx-optimizer (1) uses our own ONNX build,
(2) builds as a shared library, and (3) links against the shared
libraries of ONNX.
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c2e48b35..8af51076 100644
+index 00633856..c6f3188d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -9,8 +9,6 @@ endif(NOT MSVC)
-
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-
+@@ -27,8 +27,6 @@ if(NOT ONNX_OPT_USE_SYSTEM_PROTOBUF)
+ endif()
+
+
-set(ONNX_ROOT ${PROJECT_SOURCE_DIR}/third_party/onnx)
--add_subdirectory(${ONNX_ROOT})
-
+-add_subdirectory_if_no_target(${ONNX_ROOT} ${ONNX_TARGET_NAME})
+
file(READ "${PROJECT_SOURCE_DIR}/VERSION_NUMBER" ONNX_OPTIMIZER_VERSION)
string(STRIP "${ONNX_OPTIMIZER_VERSION}" ONNX_OPTIMIZER_VERSION)
-@@ -21,14 +19,18 @@ file(GLOB_RECURSE onnx_opt_srcs "onnxoptimizer/*.cc"
+@@ -41,14 +39,18 @@ file(GLOB onnx_opt_srcs "onnxoptimizer/*.cc"
list(REMOVE_ITEM onnx_opt_srcs "${PROJECT_SOURCE_DIR}/onnxoptimizer/cpp2py_export.cc")
- add_library(onnx_optimizer ${onnx_opt_srcs})
--target_link_libraries(onnx_optimizer PUBLIC onnx)
-+target_link_libraries(onnx_optimizer PUBLIC onnx onnx_proto)
+ onnxopt_add_library(onnx_optimizer ${onnx_opt_srcs})
+-target_link_libraries(onnx_optimizer PUBLIC ${ONNX_TARGET_NAME})
++target_link_libraries(onnx_optimizer PUBLIC ${ONNX_TARGET_NAME} onnx_proto)
target_include_directories(onnx_optimizer PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
-
+
+# These cpp macros must be defined so the ONNX headers behave
+# correctly.
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DONNX_ML=1 -DONNX_NAMESPACE=onnx")
+
- add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
+ onnxopt_add_executable(onnx_optimizer_exec examples/onnx_optimizer_exec.cpp)
-target_link_libraries(onnx_optimizer_exec onnx_optimizer)
+target_link_libraries(onnx_optimizer_exec onnx_optimizer protobuf)
-
- if(BUILD_ONNX_PYTHON)
- if("${PY_EXT_SUFFIX}" STREQUAL "")
-@@ -79,11 +81,10 @@ if(BUILD_ONNX_PYTHON)
+
+
+ file(GLOB onnx_opt_c_api_srcs "onnxoptimizer/c_api/*.cc"
+@@ -112,11 +114,10 @@ if(BUILD_ONNX_PYTHON)
PRIVATE $<TARGET_OBJECTS:onnx_optimizer>)
else()
# Assume everything else is like gcc
@@ -49,5 +49,15 @@ index c2e48b35..8af51076 100644
+ PROPERTIES LINK_FLAGS
+ "-Wl,-rpath=${CMAKE_INSTALL_PREFIX}/lib")
endif()
-
+
target_link_libraries(onnx_opt_cpp2py_export PRIVATE onnx_optimizer)
+diff --git a/cmake/utils.cmake b/cmake/utils.cmake
+index 6cca9f36..8e39d5c4 100644
+--- a/cmake/utils.cmake
++++ b/cmake/utils.cmake
+@@ -1,4 +1,4 @@
+-include(${PROJECT_SOURCE_DIR}/third_party/onnx/cmake/Utils.cmake)
++include(${ONNX_ROOT}/cmake/Utils.cmake)
+
+ # Poor man's FetchContent
+ function(add_subdirectory_if_no_target dir target)
--
2.41.0
A
A
Andy Tai wrote on 10 Sep 2023 22:12
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
CAJsg1E82mf=VOq-NLDTVXSnd+UVtAamOouEnPZTREYiAYNpQRg@mail.gmail.com
unblock 65650 by 65630

merge 65630 65650
S
S
Sharlatan Hellseher wrote on 4 Jan 18:11 +0100
(address . 65630@debbugs.gnu.org)
CAO+9K5p7KeUvMpqCJvTsgEUt4iA6oDe48n62moctzMwJzxOdZA@mail.gmail.com
Hi,

name: onnx
version: 1.12.0

Is broken on commit:

guix describe
Generation 498 Jan 04 2024 10:55:58 (current)
guix 7b0863f
branch: master
commit: 7b0863f07a113caef26fea13909bd97d250b629e

phase `make-test-directory-writable' succeeded after 0.0 seconds
starting phase `check'
running "python setup.py" with command "test" and parameters ()
running pytest
/gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/easy_install.py:144:
EasyInstallDeprecationWarning: easy_install command is deprecated. Use
build and pip and other standards-based tools.
warnings.warn(
/gnu/store/91wasjkmy50p8fq0rf9jby80mnmq1fxr-python-3.10.7/lib/python3.10/site-packages/setuptools/command/install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use
build and pip and other standards-based tools.
warnings.warn(
Searching for protobuf<=3.20.1,>=3.12.2
Download error on https://pypi.org/simple/protobuf/:[Errno -3]
Temporary failure in name resolution -- Some packages may not be
found!
Couldn't find index page for 'protobuf' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Download error on https://pypi.org/simple/:[Errno -3] Temporary
failure in name resolution -- Some packages may not be found!
No local packages or working download links found for protobuf<=3.20.1,>=3.12.2

It would be nice to have it fixed with this update.

Thanks,
Oleg

--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
?
Your comment

Commenting via the web interface is currently disabled.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 65630
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