Torch.fft in torch_tensorrt

I hava a Error when use torch_tensorrt1.4.0 speed up my model with torch.fft in Jetson agx orin(jetpack5.1). I try it in RTX4090 with the latest torch-tensorrt is ok and no similar errors were found. Why have this error in jetson? Is it a problem with lower torch_tensorrt? For me, using the latest version is difficult. So I want to know how to solve this problem。 Thank you very much.

ERROR: [Torch-TensorRT] - Method requested cannot be compiled end to end by Torch-TensorRT.TorchScript.
Unsupported operators listed below:

  • aten::real(Tensor(a) self) → Tensor(a)
  • aten::fft_ifft2(Tensor self, int[1]? s=None, int[1] dim=[-2, -1], str? norm=None) → Tensor
  • aten::fft_fft2(Tensor self, int[1]? s=None, int[1] dim=[-2, -1], str? norm=None) → Tensor
    You can either implement converters for these ops in your application or request implementation

my code:
script_model = torch.jit.script(model) #is ok
spec = {
“forward”: torch_tensorrt.ts.TensorRTCompileSpec(
**{
“inputs”: [torch_tensorrt.Input([1, 3, 1288, 1288])],
“enabled_precisions”: {torch.float},
“refit”: False,
“debug”: True,
“device”: {
“device_type”: torch_tensorrt.DeviceType.GPU,
“gpu_id”: 0,
“dla_core”: 0,
“allow_gpu_fallback”: True,
},
“capability”: torch_tensorrt.EngineCapability.default,
“num_avg_timing_iters”: 1,
}
)
}
trt_model = torch._C._jit_to_backend(“tensorrt”, script_model, spec)

What’s blocking you from using the latest releases?

I use docker ‘jetson-containers run -it dustynv/torch_tensorrt:r35.4.1’ manage my environment in jetson-containers/packages/pytorch/torch_tensorrt at master · dusty-nv/jetson-containers, because I cannot find the torch_tensorrt version of arrch64. Have you some idea to use the latest releases in Jetson? Thank you.

sir, Could you tell me how install the latest torch_tensorrt in Jetson AGX Orin? Just use ‘python3 setup.py install --jetpack-version 5.1 --use-cxx11-abi’, I have try it, but dont success. Whats more, I find that ‘ir=dynamo’ is not supported in my torch-2.0.0+nv23.05, torch_tensorrt-1.4.0, will this be a significant reason for my failure? I would greatly appreciate any response from you,thanks.

Use this

docker pull nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
docker run --runtime nvidia -it --rm --network=host nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3