[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:
Zhengxu Chen
2025-07-29 21:08:10 +00:00
committed by PyTorch MergeBot
parent c0c24b61ff
commit 8460131087
16 changed files with 561 additions and 4 deletions

View File

@ -593,6 +593,7 @@ libtorch_core_jit_sources = sorted(jit_sources_full)
libtorch_nativert_sources = [
"torch/nativert/ModelRunner.cpp",
"torch/nativert/graph/Graph.cpp",
"torch/nativert/graph/GraphPasses.cpp",
"torch/nativert/graph/GraphSignature.cpp",
@ -986,6 +987,7 @@ libtorch_python_core_sources = [
"torch/csrc/utils/verbose.cpp",
"torch/csrc/cpu/Module.cpp",
"torch/csrc/instruction_counter/Module.cpp",
"torch/nativert/python/Bindings.cpp",
] + lazy_tensor_core_python_sources
libtorch_python_distributed_core_sources = [