Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Bug] Encountered bug when using Torch-TensorRT #3129

Closed
Jeevi10 opened this issue Aug 29, 2024 · 3 comments
Closed

🐛 [Bug] Encountered bug when using Torch-TensorRT #3129

Jeevi10 opened this issue Aug 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Jeevi10
Copy link

Jeevi10 commented Aug 29, 2024

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 Jeevi10 added the bug Something isn't working label Aug 29, 2024
@narendasan
Copy link
Collaborator

How did you build the repo? Did you install torch using the nightly index?

@Jeevi10
Copy link
Author

Jeevi10 commented Aug 30, 2024

How did you build the repo? Did you install torch using the nightly index?

I didn't use nightly index

@Jeevi10
Copy link
Author

Jeevi10 commented Aug 30, 2024

I fixed it by installing nightly.

@Jeevi10 Jeevi10 closed this as completed Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants