mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
decouple the python module construction from pybind_state (#8060)
* fix broken tests * decouple the module construction to a seperate file
This commit is contained in:
parent
96cf533c76
commit
e31784b6cf
2 changed files with 17 additions and 1 deletions
16
onnxruntime/python/onnxruntime_pybind_module.cc
Normal file
16
onnxruntime/python/onnxruntime_pybind_module.cc
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#include <pybind11/pybind11.h>
|
||||
|
||||
namespace onnxruntime {
|
||||
namespace python {
|
||||
namespace py = pybind11;
|
||||
|
||||
void CreatePybindStateModule(py::module& m);
|
||||
|
||||
PYBIND11_MODULE(onnxruntime_pybind11_state, m) {
|
||||
CreatePybindStateModule(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1610,7 +1610,7 @@ static struct {
|
|||
void addObjectMethodsForTraining(py::module& m);
|
||||
#endif
|
||||
|
||||
PYBIND11_MODULE(onnxruntime_pybind11_state, m) {
|
||||
void CreatePybindStateModule(py::module& m){
|
||||
m.doc() = "pybind11 stateful interface to ONNX runtime";
|
||||
RegisterExceptions(m);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue