Cant import torch_tensorrt

ERROR:
from torch.fx.passes.pass_manager import PassManager

ModuleNotFoundError: No module named ‘torch.fx.passes.pass_manager’

PyTorch Version : 1.11
CPU Architecture: jetson AGX xavier
OS (e.g., Linux):
How you installed PyTorch: nvidia forum wheel
Build command you used (if compiling from source):
Are you using local sources or building from archives:
Python version:3.8
CUDA version: 11.4

is it problem with the torch from nvidia forum?

Hi,

Could you share your testing script with us?

Based on the doc, there is no torch.fx.passes module.
https://pytorch.org/docs/1.11/fx.html

Thanks.

import torch_tensorrt is not working

Hi,

Do you install it with the instructions shared below?

Torch-TensorRT v1.1.1

Adding support for Torch-TensorRT on Jetpack 5.0 Developer Preview

Thanks.

Hello! I am running Jetpack 5.0.2 on a Jetson Xavier NX and have the same problem as the original poster here. I installed Pytorch from the repository provided by NVIDIA for Jetson devices and installed Torch TensorRT in line with the instructions specific to Jetson devices. Any help would be much appreciated.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nvidia/.local/lib/python3.8/site-packages/torch_tensorrt/__init__.py", line 85, in <module>
    from torch_tensorrt._compile import *
  File "/home/nvidia/.local/lib/python3.8/site-packages/torch_tensorrt/_compile.py", line 9, in <module>
    import torch_tensorrt.fx
  File "/home/nvidia/.local/lib/python3.8/site-packages/torch_tensorrt/fx/__init__.py", line 12, in <module>
    from .lower_setting import LowerSetting  # noqa
  File "/home/nvidia/.local/lib/python3.8/site-packages/torch_tensorrt/fx/lower_setting.py", line 5, in <module>
    from torch.fx.passes.pass_manager import PassManager
ModuleNotFoundError: No module named 'torch.fx.passes.pass_manager'

Hello,

I’m having the same problem as @wesley3 .
The proposed solution doesn’t work for me. We are using TensorRT with Jetpack 5 on a Nvidia Xavier AGX.
Any help would be much appreciated.

Same issue for me Jetpack 5.0.2

Please do something about it. The tool chain is super unstable.
Best Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.