[nativert] Is NativeRT intended for OSS users? Request to re-enable it in the CMake build
Author: serj-avrideCreated Sep 24, 2026Updated Sep 25, 2026
Labelsmodule: buildtriagedenhancementmodule: nativertbot-triaged
The feature, motivation and pitch
We'd like to use NativeRT as the C++ runtime for torch.export models in our inference stack. Right now NativeRT is no longer a part of OSS PyTorch builds. Before investing in it, we would like to understand whether NativeRT is meant for OSS users.
I used Claude to help collect the build history and draft the details below; I reviewed them.
Context
- RFC-0043 describes NativeRT as "the standard C++ runtime succeeding TorchScript", exposed as a component of libtorch.
- It was removed from the CMake build in #164463 (CUDA sources and tests) and #178475 (the rest). Since 2.12, NativeRT is not available in pip wheels or libtorch. Only the Bazel and BUCK builds still include it.
Questions
- Why was NativeRT removed from the OSS build? Was it build breakage, binary size, or a decision that it stays internal for now?
- Is there a plan to make NativeRT available to OSS users again? If not, what is the suggested alternative ?
- If OSS support is wanted, would you accept PRs that restore the CMake build (CPU + CUDA, including
AOTInductorModelContainerCudaShim.cppandCudaTritonKernelManager.cpp) together with CI coverage? We're willing to do that work.
cc @malfet @zklaus @SherlockNoMad @zhxchen17 @yiming0416 @dolpm @albanD
Alternatives
No response
Additional context
No response
Source: pytorch/pytorch