mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[nativert] Add OSS version of ModelRunner (#159268)
Summary: Implement a ModelRunner from scratch with the minimum features for OSS only Test Plan: test_export -r NativeRT Rollback Plan: Differential Revision: D78979812 Pull Request resolved: https://github.com/pytorch/pytorch/pull/159268 Approved by: https://github.com/dolpm
This commit is contained in:
committed by
PyTorch MergeBot
parent
c0c24b61ff
commit
8460131087
@ -138,6 +138,8 @@
|
||||
#include <torch/csrc/itt.h>
|
||||
#endif
|
||||
|
||||
#include <torch/nativert/python/Bindings.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
static PyObject* module;
|
||||
@ -2780,6 +2782,8 @@ Call this whenever a new thread is created in order to propagate values from
|
||||
#ifdef USE_KINETO
|
||||
torch::global_kineto_init();
|
||||
#endif
|
||||
auto nativert_module = py_module.def_submodule("_nativert");
|
||||
torch::nativert::initModelRunnerPybind(nativert_module);
|
||||
return module;
|
||||
END_HANDLE_TH_ERRORS
|
||||
}
|
||||
|
Reference in New Issue
Block a user