trtexec error: IPluginRegistry::getCreator: Error Code 4: Cannot find plugin: grid_sampler, version: 1
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
I see the following error when I run my trtexec command:
trtexec --onnx=/azureuser/end2end_ep19.onnx --saveEngine=/azureuser/end2end_ep19.plan \
--useCudaGraph \
--plugins=/opt/tritonserver/backends/onnxruntime/libmmdeploy_onnxruntime_ops.so \
--verbose
from within the container:
[09/25/2024-17:56:30] [I] [TRT] No checker registered for op: grid_sampler. Attempting to check as plugin.
[09/25/2024-17:56:30] [V] [TRT] Local registry did not find grid_sampler creator. Will try parent registry if enabled.
[09/25/2024-17:56:30] [E] [TRT] IPluginRegistry::getCreator: Error Code 4: API Usage Error (Cannot find plugin: grid_sampler, version: 1, namespace:.)
This error is followed by a bunch of errors on the Unsqueeze node like so:
[09/25/2024-17:56:30] [E] [TRT] ModelImporter.cpp:949: While parsing node number 8539 [grid_sampler -> "onnx::Unsqueeze_10031"]:
[09/25/2024-17:56:30] [E] [TRT] ModelImporter.cpp:950: --- Begin node ---
input: "value_l_"
input: "sampling_grid_l_"
output: "onnx::Unsqueeze_10031"
name: "grid_sampler_8539"
op_type: "grid_sampler"
attribute {
name: "align_corners"
i: 0
type: INT
}
attribute {
name: "interpolation_mode"
i: 0
type: INT
}
attribute {
name: "padding_mode"
i: 0
type: INT
}
domain: "mmdeploy"
[09/25/2024-17:56:30] [E] [TRT] ModelImporter.cpp:951: --- End node ---
[09/25/2024-17:56:30] [E] [TRT] ModelImporter.cpp:954: ERROR: onnxOpCheckers.cpp:781 In function checkFallbackPluginImporter:
[6] creator && "Plugin not found, are the plugin name, version, and namespace correct?"
The model here is a DINO model in ONNX format converted to ONNX using MMDeploy, and a custom op. The custom op symbol in libmmdeploy_onnxruntime_ops.so uses libonnxruntime.so.1.15.1 which I have also copied into the Docker container, and added to my LD_LIBRARY_PATH. I am using the nvcr.io/nvidia/tensorrt:24.08-py3 Docker image and the trtexec binary built with TensorRT 10.3.
I found this other similar issue: https://github.com/onnx/onnx-tensorrt/issues/800
The conclusion there was, that TensorRT does not support the Round operation yet. Is that the same conclusion here? I.e. the grid_sampler operation is not supported in TensorRT yet? There's an issue for this too that I found (Issue#2612) that was marked 'Closed', but it looks like my issue is the exact same here.
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 with the reported trtexec command, the TensorRT 10.3 environment, and the --plugins path to libmmdeploy_onnxruntime_ops.so. Check how the grid_sampler custom op is registered and whether the loaded library is compatible with this container. Done means establishing the cause of the missing creator and documenting a verified resolution or supported limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100