Description
nvinfer1::iexecutioncontext cannot destroy
Environment
TensorRT Version: 8.0
GPU Type: nvidia xavier nx
Nvidia Driver Version: jetpack 4.6
CUDA Version: 10.2
CUDNN Version: 8.0
Operating System + Version: ubuntu 18.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):
Relevant Files
I call loadModel first, and then call the unloadModel function immediately. The program reports a Segmentation fault, which is reported in execution_context->destroy(). I try to put execution_context->destroy() in the loadModel function, and it works normally. There is no operation between loadModel and unloadModel, why is this happening?
bool nvidia_normal::UnloadModel() {
execution_context->destroy();
qDebug()<<“22”;
checkRuntime(cudaStreamDestroy(stream));
stream==nullptr;
checkRuntime(cudaFreeHost(input_data_host));
input_data_host=nullptr;
checkRuntime(cudaFreeHost(output_data_host));
output_data_host=nullptr;
checkRuntime(cudaFree(input_data_device));
input_data_device=nullptr;
checkRuntime(cudaFree(output_data_device));
output_data_device=nullptr;
engine->destroy();
runtime->destroy();
}
Steps To Reproduce
Please include:
- Exact steps/commands to build your repro
- Exact steps/commands to run your repro
- Full traceback of errors encountered