tensorrt_l2norm_helper icon indicating copy to clipboard operation
tensorrt_l2norm_helper copied to clipboard

Loading engine file with Python

Open elisabetta496 opened this issue 4 years ago • 2 comments

Hi, I have successfully used your tools to create a tensorrt engine and I'm trying to load the engine file with Python but the plugin is not found.

I'm using:

with open(engineFile, "rb") as f, trt.Runtime(G_LOGGER) as runtime: engine = runtime.deserialize_cuda_engine(f.read())

and getting the following error:

[TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin L2Norm_Helper_TRT version 1 [TensorRT] ERROR: safeDeserializationUtils.cpp (259) - Serialization Error in load: 0 (Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry) [TensorRT] ERROR: INVALID_STATE: std::exception [TensorRT] ERROR: INVALID_CONFIG: Deserialize the cuda engine failed.

Could you help me solving this issue? I don't understand how to use the Python bindings you talked about in a previous topic. In which file I have to insert them? Thanks

elisabetta496 avatar Feb 26 '20 17:02 elisabetta496

I also have the same error while loading the engine file in Python. In C++ I compile and build engine file Successfully. While loading in Python It gives me the same error. How can I use this custom layers in Python?

Neel125 avatar Apr 07 '20 04:04 Neel125

@Neel125 Could you share the details, how you build it in C++ Did you use TRT 6 version or TRT 8.

Ram-Godavarthi avatar Oct 04 '21 12:10 Ram-Godavarthi