TensorRT Plugins in FX #1590
narendasan
started this conversation in
RFCs
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Plugins in FX
TL;DR
We ship a number of plugins which implement certain key operations in TensorRT for use in TorchScript frontend converters. We would like to be able to use these plugins and new ones in FX as well.
Goal(s)
Allow users to leverage the torchtrt_plugins.so library from FX and provide an area for FX frontend developers to put plugins.
Usecases
Proposed APIs / UX
We already ship
libtorchtrt_plugins.so
as part of the torch-tensorrt package. So the end user UX would not be any different. The developer UX would involve exposing these plugins in python (likely through standard TensorRT python APIs) so that they may be called and used.Example Workflow
Limitations
Users who use converters based on python could not use the
--fx-only
build mode since there is now a dependency on C++ libraries.Internal Implementation
Design
There shouldn't be too much invloved other than perhaps some convienence functions to load in the torch_tensorrt plugin registery in addition to the TensorRT one.
Extensions Required to Core API implementations
N/A
Data Structures
N/A
Details specific for TorchScript Support
N/A
Details specific for FX support
See above.
Implementation Phases
Prototype - S
Implement a converter using on of the torch_tensorrt_plugin plugins, such as one of the norms.
MVP
(<TARGET RELEASE VERSION>)
- SConverters for the few plugins we ship and utilities to easily use the library from python.
Beta Was this translation helpful? Give feedback.
All reactions