Hello Everybody,
i have to load multiple tensorRT engines in one session, but when i do it my program crashes, while parsing the prototxt and caffemodel from the second engine.
My reproducible error code is:
G_LOGGER = tensorrt.infer.ConsoleLogger(tensorrt.infer.LogSeverity.ERROR)
engine = tensorrt.utils.caffe_to_trt_engine(G_LOGGER, #Standard way to produces a FP32-Engine
MODEL_PROTOTXT,
CAFFE_MODEL,
1,
256 << 20,
OUTPUT_LAYERS,
tensorrt.infer.DataType.FLOAT)
engine.destroy()
del engine
print ('|--------------------FAILS--------------------|')
B_LOGGER = tensorrt.infer.ConsoleLogger(tensorrt.infer.LogSeverity.ERROR)
engine = tensorrt.utils.caffe_to_trt_engine(B_LOGGER, #Standard way to produces a FP32-Engine
MODEL_PROTOTXT,
CAFFE_MODEL,
1,
256 << 20,
OUTPUT_LAYERS,
tensorrt.infer.DataType.FLOAT)
The python backtrace is:
File "/usr/local/lib/python2.7/dist-packages/tensorrt/utils/_utils.py", line 280, in caffe_to_trt_engine
blob_name_to_tensor = parser.parse(deploy_file, model_file, network, model_datatype)
File "playground.py", line 80, in main
tensorrt.infer.DataType.DataType_kHALF)
File "playground.py", line 89, in <module>
main()
And the error itself is:
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fffc82f832b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Does anybody have an idea what i am doing wrong?
Thanks!