onnx-tensorrt icon indicating copy to clipboard operation
onnx-tensorrt copied to clipboard

use custom layer in builder

Open reymondzzzz opened this issue 3 years ago • 1 comments

Hi! I created custom layer for torch, registrated in onnx ops and converted in onnx model finaly. Also I wrote trt plugin for this layer. Model builded correctly, but I set all parameters from onnx attributes like constant. How can I get attributes in plugin from onnx model. Can I do it without modify onnx parser and rebuild this repo?

[TensorRT] INFO: TensorRT/parsers/onnx/ModelImporter.cpp:139: No importer registered for op: CustomLayer. Attempting to import as plugin.
[TensorRT] INFO: TensorRT/parsers/onnx/builtin_op_importers.cpp:3775: Searching for plugin: CustomLayer, plugin_version: 1, plugin_namespace: 
[TensorRT] INFO: TensorRT/parsers/onnx/builtin_op_importers.cpp:3792: Successfully created plugin: CustomLayer

reymondzzzz avatar Feb 17 '21 21:02 reymondzzzz

@reymondzzzz You would need implement the conversion from the ONNX model to your plugin attribution. Others don't know how to convert it.

zhenhuaw-me avatar Jun 20 '22 09:06 zhenhuaw-me