Repository navigation
Remove TorchScript frontend while preserving native runtime APIs - #5071
Conversation
cc80b79 to
2ffc77a
Compare
|
Since the libtorch C++ would now be based on AOTI, we need to make sure that the user facing C++ APIs for the runtime still work using that deployment workflow. So items under |
|
Things like the user facing logger and macro apis can stay as well. Things that lifted core/util into include/torch_tensorrt |
narendasan
left a comment
There was a problem hiding this comment.
We should keep any userfacing apis that would be relevant for AOTI users going forward
| import torch.fx.passes.operator_support as op_support | ||
| import torch.fx.passes.shape_prop as shape_prop | ||
| import torch_tensorrt.fx.tracer.acc_tracer.acc_ops as acc_ops | ||
| from torch.fx.passes import splitter_base | ||
| from torch.testing._internal.common_utils import run_tests, TestCase |
There was a problem hiding this comment.
Can we also remove the fx tree?
There was a problem hiding this comment.
fixed as suggested.
There was a problem hiding this comment.
Since i have tight timeline to get this in, i will do fx removal in a seperate PR.
| @@ -1,170 +1,20 @@ | |||
| # torch_tensorrt | |||
| # Torch-TensorRT Python frontend | |||
There was a problem hiding this comment.
Lets do a full overhaul of this doc
There was a problem hiding this comment.
fixed as suggested.
Remove the TorchScript compiler frontend, Python
torch_tensorrt.tsAPIs,torchtrtcCLI, and the associated compiler-only code, tests, and documentation. Preserve the native TensorRT runtime operators and TorchBind registrations used by Dynamo/export deployment.Preserve public C++ APIs relevant to native runtime applications:
torch_tensorrt/macros.h,logging.h, andtorch_tensorrt.h, including build information, CUDA device selection, and logging controls backed by the native runtime logger.cpp/src/torch_tensorrt.cppintocore/runtime/torch_tensorrt.cpp; retain the logging wrapper incpp/src/logging.cpp.torch_tensorrt/core/runtime/, with their supporting util headers. Export the APIs from bothlibtorchtrtandlibtorchtrt_runtimeand ship the public headers in the C++ packages.find_package(torchtrt)consumers build. Propagate C++20 and update the AOTI example accordingly.Simplify
setup.pynow that the TorchScript frontend is gone: remove--no-tsand unused runtime-only/multilinux build branches, consolidate the preparation shared by install/develop/wheel commands, and fail on artifact extraction errors. Python-only and platform-specific builds remain supported.The retained controls apply to the Torch-TensorRT native runtime. Self-contained AOTInductor packages using generated execution paths have their own runtime controls.
Validation for the runtime API review changes:
//tests/cpp:test_runtime_apipasses. Runtime tarball builds, and both header archives contain the expected public/runtime/util headers..pt2inference and Windows execution were not run for this revision.Setup cleanup validation: an isolated Python-only wheel builds with version metadata and Dynamo packages; 13 selected packaging tests pass. Linux/RTX/CI/Windows ARM64 command selection and Windows/Linux artifact copying were checked, including extraction failure propagation. All applicable commit hooks, including the lockfile check, pass.