Context->destory() error


when I run context->destory(), I meet an error, [engine.cpp::nvinfer1::rt::Engine::getProfileBeginEnd::863] Error Code 2: Internal Error (Assertion profileIndex + 1 < static_cast<int32_t>(mProfileStartIndices.size()) failed. ), it’s why and how to solve it ?


TensorRT Version:
GPU Type: gtx1660
Nvidia Driver Version: 511.23
CUDA Version: 11.6
CUDNN Version: 8
Operating System + Version: windows 10, visual studio2019
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Please refer to below links related custom plugin implementation and sample:

While IPluginV2 and IPluginV2Ext interfaces are still supported for backward compatibility with TensorRT 5.1 and 6.0.x respectively, however, we recommend that you write new plugins or refactor existing ones to target the IPluginV2DynamicExt or IPluginV2IOExt interfaces instead.


there are no custom plugin in my tensorrt project ,but still existing such problom


Looks like context->destroy() is deprecated.

Could you please try delete instead of destroy().

If you still face this issue, please share with us a minimal issue repro ONNX model and script for better debugging?

Thank you.