ATC工具模型转换时报错以及模型精度存在问题
收藏回复举报
ATC工具模型转换时报错以及模型精度存在问题
t('forum.solved') 已解决
发表于2026-01-21 10:54:09
0 查看

我在昇腾310B转换ROITransformer ONNX模型的时候,碰到了一些问题:

前提条件:1、自定义实现了MMCVRotatedROIAlign的算子,且调用精度正确 2、该算子支持fp16和fp32两种精度 3、我当前使用fp16的时候,精度存在比较严重的精度下降,因此想选择fp32或者origin作为转换参数

问题一、转完的fp32模型不能推理

转换参数:atc --model=./end2end_modified1_new.onnx --framework=5 --output=end2end_1224_fp32 --soc_version=Ascend310B1 --input_shape="input:1,3,512,512" --input_format=NCHW --precision_mode=force_fp32

但是调用om的时候报错:the access address of ub is out of range,调用工具为msame工具

问题二、模型精度设置为orign模型转换报错

atc --model=./end2end_modified1_new.onnx --framework=5 --output=end2end_1224 --soc_version=Ascend310B1 --input_shape="input:1,3,512,512" --input_format=NCHW --precision_mode=must_keep_origin_dtype

转换时报错: MaxPoolv3不支持

问题三:使用MSIT工具对模型进行精度分析,多个算子出现精度低于阈值,应该如何准确定位是哪个算子出现的精度问题呢。

执行命令:

msit debug compare -gm /home/HwHiAiUser/yangyu/custom_op/val_op/17suo/end2end_modified.onnx -om /home/HwHiAiUser/yangyu/custom_op/val_op/17suo/end2end_1226_new_linux_aarch64.om \

-c /usr/local/Ascend/ascend-toolkit/latest -o /home/HwHiAiUser/yangyu/custom_op/val_op/17suo/output_npu_1227

但是得到的csv当中多个算子出现了精度问题,难以准确定位到算子问题,可参考表result_20251225061852_new.xlsx

问题4:MSIT的比对结果出现算子溢出,如何解决这个问题

上述问题详见模型转换问题记录(公开).docx

本帖最后由 匿名用户2026/01/21 11:06:54 编辑

我要发帖子