question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can the default InstanceNormalization replacement with MMCVInstanceNormalization be made optional?

See original GitHub issue

I’m with mmcv-full==1.3.16, trying to export trt engine with mmcv’s exporter but failed with,

[06/07/2022-00:28:05] [TRT] [E] 3: getPluginCreator could not find plugin: MMCVInstanceNormalization version: 1
Traceback (most recent call last):
  File "tools/deployment/onnx2tensorrt.py", line 145, in <module>
    workspace_size=args.workspace_size)
  File "tools/deployment/onnx2tensorrt.py", line 47, in onnx2tensorrt
    max_workspace_size=max_workspace_size)
  File "/path/to/my/conda_env/open-mmlab/lib/python3.7/site-packages/mmcv/tensorrt/tensorrt_utils.py", line 63, in onnx2trt
    raise RuntimeError(f'parse onnx failed:\n{error_msgs}')
RuntimeError: parse onnx failed:
In node 6 (importFallbackPluginImporter): UNSUPPORTED_NODE: Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?"

My onnx can be successfully exported by native trtexec. It seems TensorRT 7.2+ readily supports this operation. I have to otherwise register MMCVInstanceNormalization plugin somehow. Could you also show me show to do the latter?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
grimoirecommented, Jun 7, 2022

We have move TensorRT support to MMDeploy. Which supports InstanceNorm with TensorRT>=8.0

0reactions
sersercommented, Jun 7, 2022

This however generated an engine that can’t be deserialized due to tag mismatch. Confirmed to have same version of TensorRT.

As far as I know, the tag is used to distinguish different TensorRT versions. Could you check the environment again? You can use ldd on the related libraries to see which TensorRT are they linked to.

Aye. I was using the version compiled w/ the above mentioned flags to convert engines (mmcv.tensorrt.onnx2trt) and loaded it with mmcv.tensorrt.TRTWraper, all along with TensorRT-7.2.3.4 python package. I am puzzled to find the version mismatch though.

My bad, not loading correct engine file. But a new error shows up,

[06/07/2022-21:50:05] [TRT] [E] 1: [pluginV2Runner.cpp::load::290] Error Code 1: Serialization (Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
[06/07/2022-21:50:05] [TRT] [E] 4: [runtime.cpp::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)

Solved with trt.init_libnvinfer_plugins(None, "") mentioned here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

open-mmlab/mmcv - Python 博客
Can the default InstanceNormalization replacement with MMCVInstanceNormalization be made optional ? I'm with mmcv-full==1.3.16 , trying to export trt engine ...
Read more >
Serialization Error in load: 0 (Cannot deserialize plugin since ...
Hi! Have you solved it? Got the same problem. ... and got this error: [TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin ...
Read more >
tfa.layers.InstanceNormalization | TensorFlow Addons
Instance Normalization is an specific case of GroupNormalization since it normalizes all features of one channel. The Groupsize is equal to ...
Read more >
mmcv Documentation
Create a build method (optional, in most cases you can just use the default one). 2. Create a registry. 3. Use this registry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found