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)