Custom plugin fails "error: looser throw specifier for virtual"


custom plugin fails to compile on recent tensorrt ! error: looser throw specifier or
error: looser throw specifier for ‘virtual void StridedSlicePlugin::setPluginNamespace(const char*)’
void setPluginNamespace(const char* libNamespace) override


TensorRT Version: 8.01
GPU Type: jetson nx xavier, jetpack 4.6-b197
Nvidia Driver Version:
CUDA Version: 10.2
CUDNN Version: 8.2.1
Operating System + Version:
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Relevant Files

error_log.txt (6.2 KB)

Steps To Reproduce

git clone
cd nanodet
mkdir build
cd build
cmake …/
make -j2

Compilation works fine on lower jetpacks !

I’ve got the same errors when trying to compile mxnet on JP 4.6, nano

I think it’s because of the last changes in tensorrt 8.0 :

  • TensorRT now declares API’s with the noexcept keyword. All TensorRT classes that an application inherits from (such as IPluginV2) must guarantee that methods called by TensorRT do not throw uncaught exceptions, or the behavior is undefined.
1 Like

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.