public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Diego Herrera <dherrera@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/onnx] test-1.21.0: Add fix to use with onnxruntime
Date: Mon, 08 Jun 2026 15:18:17 GMT [thread overview]
Message-ID: <178093189779.1.13457899229966028786.rpms-onnx-fdc60563f9b4@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/onnx
Branch : test-1.21.0
Commit : fdc60563f9b4506b4318c93115d7c69005ded369
Author : Diego Herrera <dherrera@redhat.com>
Date : 2023-09-06T18:44:34-03:00
Stats : +53/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/onnx/c/fdc60563f9b4506b4318c93115d7c69005ded369?branch=test-1.21.0
Log:
Add fix to use with onnxruntime
---
diff --git a/onnx.spec b/onnx.spec
index 9d7a7dc..a86b27a 100644
--- a/onnx.spec
+++ b/onnx.spec
@@ -2,7 +2,7 @@
Name: onnx
Version: 1.14.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Open standard for machine learning interoperability
License: Apache-2.0
@@ -18,6 +18,8 @@ Patch1: onnx-tox.patch
Patch2: onnx-requirements.patch
# Let pyproject_wheel use binaries from cmake_build
Patch3: python-cmake-fix.patch
+# Add fixes for use with onnxruntime
+Patch4: onnxruntime_fix.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2212096
ExcludeArch: s390x
@@ -114,6 +116,9 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
%{_bindir}/check-node
%changelog
+* Wed Aug 30 2023 Diego Herrera C <dherrera@redhat.com> - 1.14.0-7
+- Add fix to use with onnxruntime
+
* Sat Aug 5 2023 Diego Herrera C <dherrera@redhat.com> - 1.14.0-6
- Lower version requirement for parameterized.
- Lower version requirement for protobuf.
diff --git a/onnxruntime_fix.patch b/onnxruntime_fix.patch
new file mode 100644
index 0000000..d7718a2
--- /dev/null
+++ b/onnxruntime_fix.patch
@@ -0,0 +1,47 @@
+diff -ruN onnx-1.14.0-orig/onnx/defs/schema.cc onnx-1.14.0/onnx/defs/schema.cc
+--- onnx-1.14.0-orig/onnx/defs/schema.cc 2023-08-04 19:00:31.645728197 -0400
++++ onnx-1.14.0/onnx/defs/schema.cc 2023-09-06 18:27:14.667106624 -0300
+@@ -17,6 +17,7 @@
+ #include "onnx/common/assertions.h"
+ #include "onnx/common/stl_backports.h"
+ #include "onnx/defs/parser.h"
++#include "onnx/onnxruntime_fix.h"
+
+ namespace ONNX_NAMESPACE {
+ // -1 means ONNX schema hasn't been loaded yet
+@@ -1061,6 +1062,9 @@
+ class SchemasRegisterer {
+ public:
+ SchemasRegisterer() {
++ // Check if static registration is actually disabled
++ if(ONNXRuntimeFix::isStaticRegistrationDisabled()) return;
++
+ // In debug builds, the number of schema registered in this constructor
+ // is compared against the number of calls to schema registration macros.
+ #ifndef NDEBUG
+diff -ruN onnx-1.14.0-orig/onnx/onnxruntime_fix.h onnx-1.14.0/onnx/onnxruntime_fix.h
+--- onnx-1.14.0-orig/onnx/onnxruntime_fix.h 1969-12-31 21:00:00.000000000 -0300
++++ onnx-1.14.0/onnx/onnxruntime_fix.h 2023-09-06 18:38:38.329785016 -0300
+@@ -0,0 +1,22 @@
++#pragma once
++
++namespace ONNX_NAMESPACE {
++
++class ONNXRuntimeFix {
++public:
++ static inline bool isStaticRegistrationDisabled() {
++ return static_registration_disabled();
++ }
++
++ static inline void disableStaticRegistration() {
++ static_registration_disabled() = true;
++ }
++
++private:
++ static inline bool& static_registration_disabled() {
++ static auto value = false;
++ return value;
++ }
++};
++
++} // namespace ONNX_NAMESPACE
reply other threads:[~2026-06-08 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178093189779.1.13457899229966028786.rpms-onnx-fdc60563f9b4@fedoraproject.org \
--to=dherrera@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox