Python, import mxnet & import tensorrt conflict?

When I import mxnet and tensorrt in same python file, there would exist a segmentation falult 11, the error outputs are as the below:

Segmentation fault: 11

Stack trace returned 10 entries:
[bt] (0) /search/odin/songminghui/anaconda3/lib/python3.6/site-packages/mxnet/ [0x7feb2300855a]
[bt] (1) /search/odin/songminghui/anaconda3/lib/python3.6/site-packages/mxnet/ [0x7feb260761b6]
[bt] (2) /lib64/ [0x7feba8561250]
[bt] (3) /search/odin/songminghui/anaconda3/lib/python3.6/site-packages/tensorrt/ [0x7feb30065701]
[bt] (4) /search/odin/songminghui/anaconda3/lib/python3.6/site-packages/tensorrt/ [0x7feb300d830a]
[bt] (5) python(_PyImport_LoadDynamicModuleWithSpec+0x185) [0x7feba8f43335]
[bt] (6) python(+0x217540) [0x7feba8f43540]
[bt] (7) python(PyCFunction_Call+0x131) [0x7feba8e40711]
[bt] (8) python(_PyEval_EvalFrameDefault+0x542d) [0x7feba8eee4ad]
[bt] (9) python(+0x1918e4) [0x7feba8ebd8e4]

My platform:

Centos: 6.5
Python: Anaconda, python 3.6.8
MXNet: 1.4.0
GPU: P40
CUDA: 10.0.130
Driver: 410.48

Thanks in advance.

Could you provide the full example, please?

Also, have you seen this tutorial - ? I don’t see they explicitly import TensorRT package into their code…

Sure, the example from this link is applied to mxnet-cu90 or mxnet-cu92 which integrate the tensorrt within mxnet. However my CUDA version is 10.0.130 and mxnet-cu100 was installed.

The code is very simple to repeat this error information:

import mxnet ax mx
import tensorrt as trt

Above two lines can lead to this error.

Actually, I have found this statement from TensorRT Developer Guide:

On Ubuntu 14.04 and CentOS, loading the Torch module and TensorRT at the same time may cause segmentation faults.

This statement may apply to MXNet and TensorRT as well, by the way, my os is CentOS.

hi, I found the same problem. Have you solved the problem?

Sorry, I did not use TRT later, so problems may still exist. @someoneAlready