grounding dino部署算子报错
收藏回复举报
grounding dino部署算子报错
t('forum.solved') 已解决
发表于2025-09-28 14:55:34
0 查看

参考项目:

项目1. hpc203/GroundingDINO-onnxrun: 使用onnxruntime部署GroundingDINO开放世界目标检测,包含C++和Python两个版本的程序

项目2.Groundingdino模型在昇腾Altas平台上的部署_e10042: generateofflinemodel execute failed. trace-CSDN博客

项目3.grounding dino onnx转om失败_CANN_昇腾论坛

环境: CANN版本8.0

onnx模型:通过网盘分享的文件:groundingdino_swint_ogc.onnx

链接: https://pan.baidu.com/s/1c8UYwrE0QpI8ghZ_7IEhRA 提取码: 3b5b

将grounding dino部署到昇腾环境,在将onnx转为om模型的过程中,遇到如下报错:

ATC run failed, Please check the detail log, Try 'atc --help' for more information
E10042: [PID: 2349531] 2025-09-28-14:22:35.463.308 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:1213]
        Call InferShapeAndType for node:/Concat_3(ConcatD) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:118]
        process pass InferShapePass on node:/Concat_3 failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:563]
        build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1618]
        GenerateOfflineModel execute failed.

依照参照项目2,完成/Concat_3467前的Unsqueeze节点删除后,出现如下报错:

ATC run failed, Please check the detail log, Try 'atc --help' for more information
E40021: [PID: 2328964] 2025-09-28-11:06:29.137.711 Failed to compile Op [/Concat_5,[/Concat_5,/Concat_5]]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/concat_d.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/utils/para_check.py", line 638, in _check_dynamic_shape
    raise RuntimeError(
RuntimeError: ({'errCode': 'E80002', 'op_name': 'concat_d', 'param_name': 'input_values', 'min_value': '-2', 'max_value': 9223372036854775807, 'real_value': -3}, 'In op, the parameter[input_values] should be in the range of [-2, 9223372036854775807], but actually is [-3].')
], optype: [ConcatD])
        Solution: See the host log for details, and then check the Python stack where the error log is reported.
        TraceBack (most recent call last):
        Compile op[/Concat_5,[/Concat_5,/Concat_5]] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/concat_d.py], optype[ConcatD], taskID[446]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:367]
        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281466629835392] recompile single op[/Concat_5] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:1069]
        [SubGraphOpt][Compile][ParalCompOp] Thread[281466629835392] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1116]
        [SubGraphOpt][Compile][CompOpOnly] CompileOp failed.[FUNC:CompileOpOnly][FILE:op_compiler.cc][LINE:1190]
        [GraphOpt][FusedGraph][RunCompile] Failed to compile graph with compiler Normal mode Op Compiler[FUNC:SubGraphCompile][FILE:fe_graph_optimizer.cc][LINE:1410]
        Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition9_rank5_new_sub_graph7[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
        subgraph 123 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:815]
        build graph failed, graph id:0, ret:4294967295[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1618]
        GenerateOfflineModel execute failed.

随后进行/Concat_5节点前的/ConstantOfShape节点删除,删除后报错如下:

ATC run failed, Please check the detail log, Try 'atc --help' for more information
E40021: [PID: 2349881] 2025-09-28-14:30:43.969.596 Failed to compile Op [/backbone/backbone.0/layers.0/blocks.0/attn/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/8.0.0/python/site-packages/tbe/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
    raise get_last_ffi_error()
tvm._ffi.base.TVMError: {'errClass': 'Inner Error', 'errCode': '[EB9000]', 'message': 'Traceback (most recent call last):
  8: TVMFuncCall
  7: 0x0000ffff9f163f67
  6: ascend_tvm::PreProcessModuleForBuild(ascend_tvm::runtime::Map<ascend_tvm::Target, ascend_tvm::IRModule, void, void> const&, ascend_tvm::Target const&)
  5: ascend_tvm::codegen::Build(ascend_tvm::IRModule, ascend_tvm::Target)
  4: 0x0000ffffa16c0047
  3: ascend_tvm::tir::CCECodegenImpl(ascend_tvm::IRModule const&, ascend_tvm::Target)
  2: ascend_tvm::tir::AnalyseUseDef(ascend_tvm::tir::CCEPrimFunc&, bool)
  1: ascend_tvm::runtime::detail::LogFatal::Entry::Finalize()
  0: ascend_tvm::runtime::Backtrace()
  File "analyse_usedef.cc", line 259

TVMError: [EB9000] Check failed: (is_input_arg) is false: cce_func name te_add_c2fda1af1ac02119cbdaa9b4f4b17959f50c7f8485563b997b7c082498b7cd44  Variable i0 does not appear in args', 'errPcause': 'N/A', 'errSolution': 'N/A'}

], optype: [Add])
        Solution: See the host log for details, and then check the Python stack where the error log is reported.
        TraceBack (most recent call last):
        Compile op[/backbone/backbone.0/layers.0/blocks.0/attn/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py], optype[Add], taskID[558]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:367]
        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281471533566592] recompile single op[/backbone/backbone.0/layers.0/blocks.0/attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:1069]
        [SubGraphOpt][Compile][ParalCompOp] Thread[281471533566592] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1116]
        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281471567383168] recompile single op[/backbone/backbone.0/layers.0/blocks.1/attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:1069]
        [SubGraphOpt][Compile][CompOpOnly] CompileOp failed.[FUNC:CompileOpOnly][FILE:op_compiler.cc][LINE:1190]
        [SubGraphOpt][Compile][ParalCompOp] Thread[281471567383168] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1116]
        [GraphOpt][FusedGraph][RunCompile] Failed to compile graph with compiler Normal mode Op Compiler[FUNC:SubGraphCompile][FILE:fe_graph_optimizer.cc][LINE:1410]
        Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition11_rank67_new_sub_graph2908[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
        subgraph 200 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:815]
        Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition11_rank145_new_sub_graph3061[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
        Failed to compile Op [/backbone/backbone.0/layers.1/blocks.0/attn/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/8.0.0/python/site-packages/tbe/tvm/_ffi/_ctypes/packed_func.py", line 239, in __call__
    raise get_last_ffi_error()
tvm._ffi.base.TVMError: {'errClass': 'Inner Error', 'errCode': '[EB9000]', 'message': 'Traceback (most recent call last):
  8: TVMFuncCall
  7: 0x0000ffff9f163f67
  6: ascend_tvm::PreProcessModuleForBuild(ascend_tvm::runtime::Map<ascend_tvm::Target, ascend_tvm::IRModule, void, void> const&, ascend_tvm::Target const&)
  5: ascend_tvm::codegen::Build(ascend_tvm::IRModule, ascend_tvm::Target)
  4: 0x0000ffffa16c0047
  3: ascend_tvm::tir::CCECodegenImpl(ascend_tvm::IRModule const&, ascend_tvm::Target)
  2: ascend_tvm::tir::AnalyseUseDef(ascend_tvm::tir::CCEPrimFunc&, bool)
  1: ascend_tvm::runtime::detail::LogFatal::Entry::Finalize()
  0: ascend_tvm::runtime::Backtrace()
  File "analyse_usedef.cc", line 259

TVMError: [EB9000] Check failed: (is_input_arg) is false: cce_func name te_add_865fa137adb0918c657a921207b1ed8ff54e088054477de08512e0a0026c96dc  Variable i0 does not appear in args', 'errPcause': 'N/A', 'errSolution': 'N/A'}

], optype: [Add])
        Compile op[/backbone/backbone.0/layers.1/blocks.0/attn/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.0/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py], optype[Add], taskID[775]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:367]
        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281471567383168] recompile single op[/backbone/backbone.0/layers.1/blocks.1/attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:1069]
        Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition11_rank338_new_sub_graph3442[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[281471592745600] recompile single op[/backbone/backbone.0/layers.1/blocks.0/attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:1069]
        [SubGraphOpt][Compile][ParalCompOp] Thread[281471592745600] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1116]
        Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition11_rank260_new_sub_graph3289[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
        build graph failed, graph id:0, ret:4294967295[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1618]
        GenerateOfflineModel execute failed.

这个报错已经无法解决了,但我还是按照项目2的提示走完了删除/transformer/ReduceSum_16节点的流程,删除后进行ATC转换报错同上。请问一下应该如何解决?之前我在论坛也提问过,具体见项目3,但问题还没有解决就采纳关闭了。

本帖最后由 匿名用户 于 2025/09/28 15:47:13 编辑

我要发帖子