NVIDIA / TensorRT

NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.
https://developer.nvidia.com/tensorrt
Apache License 2.0
10.6k stars 2.11k forks source link

trtexec error, Error Code 3: Internal Error (SymbolAddress for getPluginCreators could not be loaded, #4051

Open jjxyai opened 1 month ago

jjxyai commented 1 month ago

Description

convert onnx to engine with trtexec:

trtexec --onnx=model.onnx --dynamicPlugins=plugin_lib.dll --saveEngine=model16.engine --fp16 --allowGPUFallback

with error output:

[E] [TRT] 3: [libLoader.cpp::nvinfer1::rt::DynamicLibrary::Impl::untypedSymbolAddress::365] Error Code 3: Internal Error (SymbolAddress for getPluginCreators could not be loaded, check function name against library symbol)

Environment

TensorRT Version:8.6

NVIDIA GPU:4060

NVIDIA Driver Version:546.92

CUDA Version:12.3

CUDNN Version:8.9

Operating System:win11

lix19937 commented 1 month ago

Check your dll function api right, or use static plugin.
dumpbin /exports ./plugin_lib.dll

leimao commented 1 month ago

getCreators (previously known as getPluginCreators) has to be implemented in the plugin shared library if you want to use trtexec --dynamicPlugins.

ttyio commented 1 month ago

yes, this is documented in https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#generating-plugin-library, will close this, thanks all!

leimao commented 1 month ago

https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#generating-plugin-library

No, it did not say it is a must for trtexec.

ttyio commented 1 month ago

https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#generating-plugin-library

No, it did not say it is a must for trtexec.

This is a must if you want your plugin work with the version compatibility feature. However, I reopen this created internal issue to track the document update for this.

jjxyai commented 1 month ago

getCreators (previously known as getPluginCreators) has to be implemented in the plugin shared library if you want to use trtexec --dynamicPlugins.

solved by adding methods mentioned in 9.9.1. Generating Plugin Shared Libraries

thanks a lot!!