atc工具将onnx格式转换为om格式报错
收藏回复举报
atc工具将onnx格式转换为om格式报错
t('forum.solved') 已解决
新人帖
发表于2025-08-07 15:01:02
0 查看

如题所示,使用的开发板型号为atlas200I A2 DK,模型文件由下载链接给出,可以正常运行。使用atc转换模型时报错,还请版主帮忙看一下,谢谢。

导出的onnx文件在百度云盘,下载链接:https://pan.baidu.com/s/1_dDxaSMG2vbw47FJ7FdUUg 提取码:u6lr 模型来源于https://github.com/hpc203/GroundingDINO-onnxrun/tree/main

报错信息:

atc --model=groundingdino_swint_ogc.onnx --framework=5 --input_shape='img:1,3,1200,800;input_ids:1,256;attention_mask:1,256;position_ids:1,256;token_type_ids:1,256;text_token_mask:1,256,256' --output=model --soc_version=Ascend310B4
ATC start working now, please wait for a moment.
...
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E10042: GenerateOfflineModel execute failed.
        TraceBack (most recent call last):
        op[/Concat_3], the input shape dims should be equal except merge axis,shapes:[[1, ], [1, 1, ], ]axis:0[FUNC:ConcatInferShapeCommon][FILE:split_combination_ops.cc][LINE:892]
        Call InferShapeAndType for node:/Concat_3(ConcatD) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:119]
        process pass InferShapePass on node:/Concat_3 failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:571]
        build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
        GenerateOfflineModel execute failed.

目前怀疑是concat算子在onnx模型的定义与atc工具不适配。当初转换时使用的onnx和onnxruntime版本为1.14。关于/Concat_3的具体信息如下:true 看了一下昇腾官方对concat算子的说明感觉没什么问题,不清楚为什么会有这样的报错。。true

我要发帖子