mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Revert "Test adding unload method for shared providers"
This reverts commit c427b78799.
This commit is contained in:
parent
58a675ec2b
commit
9287e602b7
2 changed files with 3 additions and 11 deletions
|
|
@ -938,7 +938,6 @@ void addGlobalMethods(py::module& m, Environment& env) {
|
|||
throw std::runtime_error("Error when creating and registering allocator: " + st.ErrorMessage());
|
||||
}
|
||||
});
|
||||
m.def("unload_shared_providers", &UnloadSharedProviders, "Unload the shared providers (needs to be done for a safe shutdown)");
|
||||
|
||||
#ifdef USE_NUPHAR
|
||||
// TODO remove deprecated global config
|
||||
|
|
@ -2098,9 +2097,9 @@ PYBIND11_MODULE(onnxruntime_pybind11_state, m) {
|
|||
LOGS(default_logger, WARNING) << "Init provider bridge failed.";
|
||||
}
|
||||
|
||||
// atexit([] {
|
||||
// UnloadSharedProviders();
|
||||
// });
|
||||
atexit([] {
|
||||
UnloadSharedProviders();
|
||||
});
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_TRAINING
|
||||
|
|
|
|||
|
|
@ -930,12 +930,5 @@ class TestInferenceSession(unittest.TestCase):
|
|||
set())
|
||||
print("Create session with customize execution provider successfully!")
|
||||
|
||||
def testUnloadSharedProviders(self):
|
||||
|
||||
print("Unloading shared providers")
|
||||
from onnxruntime.capi import _pybind_state as C
|
||||
C.unload_shared_providers()
|
||||
print("Finished unloading")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue