×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

使用onnx_build转换rtmdet导出的onnx时出现问题 解决中 大爷快跑2023-07-28 15:38:30 回复 1 查看 使用求助
使用onnx_build转换rtmdet导出的onnx时出现问题
分享到:

硬件平台为MLU370 s4,使用mmyolo中的easydeploy导出onnx,之后使用onnx_build工具时报错,以下是所有输出,不知是否与nms也被转为onnx有关:

2023-07-28 15:32:33.674027: INFO: /home/kyxz/magicmind/mm_build/main.cc:13]

==================== Parameter Information

--precision<Str>              :

--calibration<Bool>           : false

--rpc_server<Str>             :

--calibration_algo<Str>       : linear

--file_list<Vec<Str>>         :

--calibration_data_path<Str>  :

--random_calib_range<Vec<Float>>:

--batch_size<Vec<Int>>        :

--input_dims<Vec<Vec<Int>>>   :

--input_layout<Vec<Str>>      :

--input_dtypes<Vec<Str>>      : FLOAT

--dynamic_shape<Bool>         : true

--vars<Vec<Vec<Float>>>       :

--means<Vec<Vec<Float>>>      :

--output_layout<Vec<Str>>     :

--output_dtypes<Vec<Str>>     :

--mlu_arch<Vec<Str>>          :

--mlu_product_name<Vec<Str>>  :

--plugin<Vec<Str>>            :

--magicmind_model<Str>        : ./model

--build_config<Str>           :

--toolchain_path<Str>         : /usr/local/gcc-linaro-6.2.1-2016.11-x86_64_aarch64-linux-gnu/

--rgb2bgr<Bool>               : false

--cluster_num<Vec<Vec<Int>>>  :

--onnx<Str>                   : ./rtmdet.onnx

MagicMind: 1.5.0

2023-07-28 15:32:35.296165: WARNING:  magicmind/conversion/parser/onnx2mm/lower/tensor_ops.cc:316] Attributes: cubic_coeff_a, exclude_outside and extrapolation_value are not supported in magicmind now!

2023-07-28 15:32:35.296208: WARNING:  magicmind/conversion/parser/onnx2mm/lower/tensor_ops.cc:322] ROI value is used for mode: tf_crop_and resize, but mode: tf_crop_and_resize is not supported in MagicMind now!

2023-07-28 15:32:35.299926: WARNING:  magicmind/conversion/parser/onnx2mm/lower/tensor_ops.cc:316] Attributes: cubic_coeff_a, exclude_outside and extrapolation_value are not supported in magicmind now!

2023-07-28 15:32:35.299964: WARNING:  magicmind/conversion/parser/onnx2mm/lower/tensor_ops.cc:322] ROI value is used for mode: tf_crop_and resize, but mode: tf_crop_and_resize is not supported in MagicMind now!

2023-07-28 15:32:35.706265: INFO: /home/kyxz/magicmind/mm_build/main_process.cc:385] Reset input dtypes.

2023-07-28 15:32:35.707928: INFO:  magicmind/dialect/common/dim_range_utils.cc:1267] Input tensor(0)'s shape ([1, 3, 640, 640]) will be overwritten by dim range set on build config ([-1, -1, -1, -1])

loc("main/mm.neg/cnnl.neg"): error: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:35.894233: ERROR:  magicmind/dialect/mm/transforms/mm_const_fold.cc:251] Run pass pipeline failed!

loc("main/Neg_631/mm.neg"): error: Const fold failed.

2023-07-28 15:32:35.894436: INFO:  magicmind/conversion/pass_manager.cc:173] Pipeline  dumping .//compile_graph/process_shape_infer_and_fold2/0_5_MMConstFold

2023-07-28 15:32:37.571327: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: MMConstFold: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:37.571363: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: MMShapeInferAndFold: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:37.571373: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: Verify: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:37.571380: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: MMConstFold: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.mm.neg

2023-07-28 15:32:37.571386: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: MMShapeInferAndFold: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.mm.neg

2023-07-28 15:32:37.571391: ERROR:  magicmind/dialect/mm/transforms/mm_shape_infer_and_fold.cc:56] Failed to run pass pipeline: Verify: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.

loc("builtin.module"): error: Failures have been detected while processing an MLIR pass pipeline

2023-07-28 15:32:40.862648: INFO:  magicmind/conversion/pass_manager.cc:173] Pipeline func.func(per-axis-qcast-conversion) dumping .//compile_graph/process_main_process_optimize1/2_4_MMShapeInferAndFold

2023-07-28 15:32:42.467898: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: MMConstFold: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:42.467935: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: MMShapeInferAndFold: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:42.467942: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: Verify: 'cnnl.neg' op Input type must be Int32 or FloatType

2023-07-28 15:32:42.467949: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: MMConstFold: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.mm.neg

2023-07-28 15:32:42.467955: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: MMShapeInferAndFold: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.mm.neg

2023-07-28 15:32:42.467961: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: Verify: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.

2023-07-28 15:32:42.467966: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: MMShapeInferAndFold: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.Failures have been detected while processing an MLIR pass pipelinebuiltin.module

2023-07-28 15:32:42.467973: ERROR:  magicmind/cc/implement/processor.cc:211] Failed to run pass pipeline: Verify: 'cnnl.neg' op Input type must be Int32 or FloatTypeConst fold failed.Failures have been detected while processing an MLIR pass pipeline

2023-07-28 15:32:42.469622: ERROR:  magicmind/cc/implement/processor.cc:445]  status(Status) error:Internal: Run pass pipeline failed!.

2023-07-28 15:32:42.469642: ERROR:  magicmind/cc/implement/interface_builder_impl.cc:118] Build model failed!

2023-07-28 15:32:42.470435: ERROR: /home/kyxz/magicmind/mm_build/main_process.cc:417] BuildModel failed

2023-07-28 15:32:42.470445: ERROR: /home/kyxz/magicmind/mm_build/../mm_build/main_process.h:37] BuildAndSerialize(net, config, param) is null or 0

已放弃 (核心已转储)



请问应该如何解决?

版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭