ONNX to TensorRT conversion fails due to GridSample
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Description
I am trying to convert a model from PyTorch to ONNX, which was successful. However, when I convert the ONNX to TensorRT, an error occurs because the older version of TensorRT doesn't support GridSample. Newer versions of TensorRT solve the above issue, but I am limited to using the current version, 8.2.1.8.
I tried installing mmdeploy and adding the libmmdeploy_tensorrt_ops.so operator library file to the trtexec --plugin command (https://github.com/NVIDIA/TensorRT/issues/2756), but I'm still getting the same error.
Is there a solution to this problem? Or a guide on how to add the GridSample operator to the aforementioned version of TensorRT?
Environment
TensorRT Version: 8.2.1.8
CUDA Version: 10.2
Operating System: Jetpack 4.6.1 [L4T 32.7.1]
Python Version: 3.6.15
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ONNX-to-TensorRT conversion with TensorRT 8.2.1.8 on JetPack 4.6.1, then inspect the trtexec --plugin invocation and the libmmdeploy_tensorrt_ops.so library. A useful resolution would document whether GridSample can be supported on this version or identify a compatible workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100