TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

🐛 [Bug] Encountered bug when using Torch-TensorRT

Open Jeevi10 opened this issue 1 year ago • 0 comments

Bug Description

https://github.com/pytorch/TensorRT/blob/main/examples/dynamo/mutable_torchtrt_module_example.py I wasn't able to run this file above.

I attempted to build the package from source but encountered an issue during the installation of torch version >2.5.0.dev and <2.6.0. Upon investigation, I found that there are no torch distributions matching these version constraints. Furthermore, when using pip install, I received the following error:


AttributeError Traceback (most recent call last) Cell In[1], line 34 25 base_model.to(device) 28 settings = { 29 "use_python": False, 30 "enabled_precisions": {torch.float32}, 31 "make_refitable": True, 32 } ---> 34 mutable_module = torch_trt.MutableTorchTensorRTModule(base_model, **settings) 35 # You can use the mutable module just like the original pytorch module. The compilation happens while you first call the mutable module. 36 mutable_module(*inputs)

AttributeError: module 'torch_tensorrt' has no attribute 'MutableTorchTensorRTModule'

To Reproduce

Please run (https://github.com/pytorch/TensorRT/blob/main/examples/dynamo/mutable_torchtrt_module_example.py) Steps to reproduce the behavior: Run above code

Jeevi10 avatar Aug 29 '24 13:08 Jeevi10