mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

cascaderccn convert to TRT failed. importTopK is not supported.

Open roxroxroxrox opened this issue 3 years ago • 0 comments

Checklist

  • [X] I have searched related issues but cannot get the expected help.
  • [X] 2. I have read the FAQ documentation but cannot get the expected help.
  • [X] 3. The bug has not been fixed in the latest version.

Describe the bug

转换onnx成功,但是转TRT提示算子不支持

importTopK这个算子

RuntimeError: Failed to parse onnx, In node 2291 (importTopK): UNSUPPORTED_NODE: Assertion failed: (inputs.at(1).is_weights()) && "This version of TensorRT only supports input K as an initializer."

Reproduction

python.exe .\mmdeploy\tools\onnx2tensorrt.py .\mmdeploy\configs\mmdet\instance-seg\instance-seg_tensorrt_static-1440x1920.py work_dir\soydet\onnx\end2end.onnx ./work_dir/soydet\onnx\end2end.engine --device-id 0 --log-level WARNING

Environment

【environment】
TorchVision: 0.12.0
OpenCV: 4.6.0
MMCV: 1.6.1
MMCV Compiler: MSVC 192930140
MMCV CUDA Compiler: not available
MMDeploy: 0.8.0+


**********Backend information**********
onnxruntime: 1.8.1  ops_is_avaliable : True
tensorrt: 8.2.3.0   ops_is_avaliable : True
ncnn: None  ops_is_avaliable : False
pplnn_is_avaliable: False
openvino_is_avaliable: False
snpe_is_available: False
ascend_is_available: False
coreml_is_available: False


**********Codebase information**********
mmdet:      2.25.1
mmseg:      0.27.0
mmcls:      0.23.2
mmocr:      None
mmedit:     None
mmdet3d:    None
mmpose:     None
mmrotate:   None

Error traceback

No response

roxroxroxrox avatar Sep 16 '22 06:09 roxroxroxrox