Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScatterND Plugin not found while converting onnx into tensorrt model #805

Closed
sunilpankaj opened this issue Sep 29, 2020 · 26 comments
Closed
Labels
ONNX Issues relating to ONNX usage and import triaged Issue has been triaged by maintainers

Comments

@sunilpankaj
Copy link

Able to convert pytorch model into onnx and validated onnx output with pytorch. it's working fine. But when I try to convert onnx into tensorrt engine, it fails at onnx parser and return this error.

[TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin ScatterND version 1

Onnx version : 1.6.0
Tensorrt version : 7.1.3.4

Can anyone please help here, how can I add ScatterND plugin in python and how can I use it ? Is there any other way to solve this problem ?

Thanks in advance.

@Jacoobr
Copy link

Jacoobr commented Sep 30, 2020

Hi, sunilpankaj. Maybe you should register the ScatterND in builtin_op_importers. The builtin_op_importers write the logical operations that tensorrt called when onnx-tensorrt try to convert onnx model to trt engine. BTY, you also can implement the ScatterND with plugin manner, like plugin. Last but not least, DEFINE_BUILTIN_OP_IMPORTER(ScatterND){} is must if you want the onnx-tensorrt parse you own ScatterND operation. Hope this can help U~.

@zldrobit
Copy link

I encountered the same problem as OP.
I use trtexec tool for converting onnx to TensorRT model.
I notice that there's no ScatterND plugin in TensorRT.

@ttyio
Copy link
Collaborator

ttyio commented Nov 27, 2020

Hello @sunilpankaj @zldrobit
Sorry there is no support for ScatterND yet. You can follow @Jacoobr 's suggestion to implement your own plugin and register in ONNX parser. thanks!

@ttyio ttyio added ONNX Issues relating to ONNX usage and import triaged Issue has been triaged by maintainers labels Nov 27, 2020
@ajaichemmanam
Copy link

@ttyio @Jacoobr
Can you give a sample scatterND plugin implementation? and how to use it?

@GrainsofSalt
Copy link

I am having the same issue. @Jacoobr @ttyio Is there any sample documentation for implementing a plugin like this?

@alicera
Copy link

alicera commented Feb 2, 2021

I also meet the [TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin ScatterND version 1

@mfoglio
Copy link

mfoglio commented Mar 2, 2021

Same here

@PhilCuriosity
Copy link

PhilCuriosity commented Mar 10, 2021

嗨,sunilpankaj。也许你应该登记在ScatterND builtin_op_importers。Builtin_op_importers编写了在onnx-tensorrt尝试将onnx模型转换为trt引擎时tensorrt调用的逻辑操作。顺便说一句,您还可以通过plugin方式实现ScatterND,例如plugin。最后但并非最不重要的一点是,如果您希望onnx-tensorrt解析自己的ScatterND操作,则必须DEFINE_BUILTIN_OP_IMPORTER(ScatterND){}。希望这对你有帮助。

能提供一份实例代码嘛,谢谢

@htran170642
Copy link

Have you guys converted to tensorrt 7.1x sucessfully? Thanks

@alicera
Copy link

alicera commented Aug 15, 2021

If it has the tourial for creating the custom operator, it will be good

@ttyio
Copy link
Collaborator

ttyio commented Aug 16, 2021

FYI, ScatterND is native op in next TRT release, in about 2 months, thanks

@alicera
Copy link

alicera commented Aug 16, 2021

Hi @ttyio
Thanks.
Do you have the tutorial for creating the custom operator?

@alicera
Copy link

alicera commented Aug 17, 2021

Hi @ttyio
Thanks.
By the way, how to check the tensorRT version for my os?

@ttyio
Copy link
Collaborator

ttyio commented Aug 17, 2021

Hi @alicera
For python

  >>> import tensorrt
  >>> print(tensorrt.__version__)

For C++, you can use getInferLibVersion(), thanks

@alicera
Copy link

alicera commented Aug 17, 2021

Hi @ttyio
Does it has the easy command to check the version, like watch nvidia-smi?
Or go to xxx folder to see the info.

@ttyio
Copy link
Collaborator

ttyio commented Aug 17, 2021

Hi @alicera
Maybe you can search libnvinfer.so in you system and check which file it is link to.

@LukeAI
Copy link

LukeAI commented Aug 21, 2021

@ttyio - so apparently the 21.07 TensorRT container includes the ScatterND plugin. - Do you know if there some way to install this, natively?

@htran170642
Copy link

@LukeAI I did build successfully ScatterBN plugin with Tensorrt 7.2.2.3. You just clone the repo with your expected version and copy folder ScatterND in folder plugin then rebuild your tensorrt.

@stardust2602
Copy link

@LukeAI I did build successfully ScatterBN plugin with Tensorrt 7.2.2.3. You just clone the repo with your expected version and copy folder ScatterND in folder plugin then rebuild your tensorrt.

Hi, can it work with ScatterElements op ?

@xiangyun-hz
Copy link

@htran170642 where the repo?

@nvpohanh
Copy link
Collaborator

I think ScatterND is supported as of TRT 8.4 EA. @rajeevsrao could you confirm?

@htran170642
Copy link

@htran170642 where the repo?

this repo: https://github.com/NVIDIA/trt-samples-for-hackathon-cn
but you'd better use Tensorrt 8x, it's already supported many plugins like that

@rajeevsrao
Copy link
Collaborator

rajeevsrao commented May 13, 2022

Yes, TensorRT 8.4 EA release has support for ONNX ScatterND Operator.
https://developer.nvidia.com/nvidia-tensorrt-8x-download

@sunilpankaj can you give it try?

@nvpohanh
Copy link
Collaborator

Closing for now due to >14 days with no response. Please feel free to reopen if the issue still exists. Thanks

@nvpohanh nvpohanh closed this as completed Jul 1, 2022
@daxiongpro
Copy link

@LukeAI I did build successfully ScatterBN plugin with Tensorrt 7.2.2.3. You just clone the repo with your expected version and copy folder ScatterND in folder plugin then rebuild your tensorrt.

hello, can you make a tutorial for making ScatterND Plugin on TensorRT 7.2.2.3 ? thx very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ONNX Issues relating to ONNX usage and import triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests