#198566·pytorch

[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

  1. Why was NativeRT removed from the OSS build? Was it build breakage, binary size, or a decision that it stays internal for now?
  2. Is there a plan to make NativeRT available to OSS users again? If not, what is the suggested alternative ?
  3. If OSS support is wanted, would you accept PRs that restore the CMake build (CPU + CUDA, including AOTInductorModelContainerCudaShim.cpp and CudaTritonKernelManager.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