public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/onnxruntime] rawhide: Fix static registration on python
@ 2026-07-02 22:36 Diego Herrera
  0 siblings, 0 replies; only message in thread
From: Diego Herrera @ 2026-07-02 22:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/onnxruntime
Branch : rawhide
Commit : 51f6eb45f056db9f4d4700978fdb6e116438223d
Author : Diego Herrera <dherrera@redhat.com>
Date   : 2026-07-02T18:36:15-04:00
Stats  : +31/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/onnxruntime/c/51f6eb45f056db9f4d4700978fdb6e116438223d?branch=rawhide

Log:
Fix static registration on python

---
diff --git a/0012-onnx-static-registration-fix.patch b/0012-onnx-static-registration-fix.patch
index 24265c0..1869e2b 100644
--- a/0012-onnx-static-registration-fix.patch
+++ b/0012-onnx-static-registration-fix.patch
@@ -1,6 +1,6 @@
-From 7b2a5a4d8c35c63c415572175ad233f413aa7c55 Mon Sep 17 00:00:00 2001
+From 7f8fc5a2a68650fdfb5ea585f21df15a7bb2c4d4 Mon Sep 17 00:00:00 2001
 From: Diego Herrera <dherrera@redhat.com>
-Date: Wed, 1 Jul 2026 01:04:34 -0400
+Date: Thu, 2 Jul 2026 18:33:43 -0400
 Subject: [PATCH 12/12] onnx static registration fix
 
 
@@ -30,6 +30,33 @@ index 3f28529e7a..83d681df5a 100644
    return &ort_api_base;
  }
  
+diff --git a/onnxruntime/python/onnxruntime_pybind_module.cc b/onnxruntime/python/onnxruntime_pybind_module.cc
+index ebe027c9ef..3443bc65b4 100644
+--- a/onnxruntime/python/onnxruntime_pybind_module.cc
++++ b/onnxruntime/python/onnxruntime_pybind_module.cc
+@@ -14,6 +14,7 @@
+ #include "core/framework/provider_options.h"
+ #include "core/platform/env.h"
+ #include "core/common/inlined_containers.h"
++#include "onnx/onnxruntime_fix.h"
+ 
+ namespace onnxruntime {
+ namespace python {
+@@ -109,6 +110,14 @@ PYBIND11_MODULE(onnxruntime_pybind11_state, m, py::mod_gil_not_used()) {
+ #else
+ PYBIND11_MODULE(onnxruntime_pybind11_state, m) {
+ #endif
++  class RunONNXRuntimeFix {
++   public:
++    RunONNXRuntimeFix() {
++      onnx::ONNXRuntimeFix::disableStaticRegistration();
++    }
++  };
++  static RunONNXRuntimeFix runONNXRuntimeFix;
++
+   auto st = CreateInferencePybindStateModule(m);
+   if (!st.IsOK())
+     throw pybind11::import_error(st.ErrorMessage());
 -- 
 2.54.0
 

diff --git a/onnxruntime.spec b/onnxruntime.spec
index 5ba2116..f823995 100644
--- a/onnxruntime.spec
+++ b/onnxruntime.spec
@@ -74,6 +74,8 @@ Patch:      0009-System-dnnl.patch
 Patch:      0010-dnnl-Clean-unused-vars.patch
 # Use the system openVINO
 Patch:      0011-openVINO-runtime-fix.patch
+# Trigger onnx static registration fix
+Patch:      0012-onnx-static-registration-fix.patch
 
 # armv7hl: https://bugzilla.redhat.com/show_bug.cgi?id=2235328
 # i686:    https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-02 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 22:36 [rpms/onnxruntime] rawhide: Fix static registration on python Diego Herrera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox