diff --git a/onnxruntime/python/onnxruntime_pybind_module.cc b/onnxruntime/python/onnxruntime_pybind_module.cc new file mode 100644 index 0000000000..bd844ea873 --- /dev/null +++ b/onnxruntime/python/onnxruntime_pybind_module.cc @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#include + +namespace onnxruntime { +namespace python { +namespace py = pybind11; + +void CreatePybindStateModule(py::module& m); + +PYBIND11_MODULE(onnxruntime_pybind11_state, m) { + CreatePybindStateModule(m); +} +} +} \ No newline at end of file diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 229fa4604e..1238f9e1e1 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -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);