grimoire / torch2trt_dynamic

A pytorch to tensorrt convert with dynamic shape support
MIT License
254 stars 34 forks source link

getPluginCreator could not find plugin RepeatDimsPluginDynamic version 1 #32

Open yantiantianlx opened 1 year ago

yantiantianlx commented 1 year ago

看起来没有定义这个RepeatDimsPluginDynamic plugin, 是需要自己定义么,还是需要从哪里下载插件包。

[TensorRT] ERROR: INVALID_ARGUMENT: getPluginCreator could not find plugin RepeatDimsPluginDynamic version 1 Traceback (most recent call last): File "mmdetection-to-tensorrt/demo/inference.py", line 45, in main() File "mmdetection-to-tensorrt/demo/inference.py", line 27, in main cfg_path, args.checkpoint, fp16_mode=args.fp16, device=args.device) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/mmdetection-to-tensorrt/mmdet2trt/mmdet2trt.py", line 156, in mmdet2trt int8_calib_algorithm=int8_calib_algorithm) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/torch2trt_dynamic/torch2trt_dynamic/torch2trt_dynamic.py", line 534, in torch2trt_dynamic outputs = module(inputs) File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, *kwargs) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/mmdetection-to-tensorrt/mmdet2trt/models/detectors/two_stage.py", line 48, in forward rois = rpn_head(feat, x) File "/usr/local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, *kwargs) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/mmdetection-to-tensorrt/mmdet2trt/models/dense_heads/rpn_head.py", line 55, in forward proposals = mm2trt_util.gather_topk(proposals, 1, topk_inds) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/mmdetection-to-tensorrt/mmdet2trt/ops/util_ops.py", line 59, in gather_topk index = index.repeat(repeat_size) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/torch2trt_dynamic/torch2trt_dynamic/torch2trt_dynamic.py", line 325, in wrapper converter'converter' File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/torch2trt_dynamic/torch2trt_dynamic/converters/repeat.py", line 16, in convert_repeat plugin = create_repeatplugin("repeat" + str(id(input)), repeat_shape=shape) File "/data/sda/ytt/raycloud_server/test_tensorRT/mmdetection/torch2trt_dynamic/torch2trt_dynamic/plugins/create_repeatdim_plugin.py", line 24, in create_repeat_plugin res = creator.create_plugin(layer_name, pfc) AttributeError: 'NoneType' object has no attribute 'create_plugin'

grimoire commented 1 year ago

It has been deprecated. repeat does not use this plugin.

yantiantianlx commented 1 year ago

OK, thanks, I use the wrong commit. And when I convert cascade-rcnn model to tensorrt, it can only be 1.3 times faster in fp32 (inference time is from 84ms in pytorch to 64ms in tensorrt), and the GPU memery usage is not reduced. Is this normal?