Description
Based on this comment by @narendasan, the usage of the TRTModuleNext functionality, now named TorchTensorRTModule, could be automatically toggled based on the availability of the C++ functionality, like so:
try:
import TorchTensorRTModule
USE_PYTHON_RT = False
except:
USE_PYTHON_RT = True
Related Issues
#1993, #1943