编译部署自定义算子后通过atc将onnx转om出错
收藏回复举报
编译部署自定义算子后通过atc将onnx转om出错
t('forum.solved') 已解决
发表于2025-11-08 11:12:03
0 查看
使用的是atlas 200i dk a2,8.0RC1,指令是atc --framework=5 --model="./llama.onnx" --output="tinyllama" --input_format=ND --input_shape="input_ids:1,1;attention_mask:1,257;position_ids:1,1;past_key_values:22,2,1,4,256,64" --log=debug --soc_version=Ascend310B4
root@DESKTOP-P5C4KSR:/mnt/d/Project/export_llama# atc --framework=5 --model="./llama.onnx" --output="tinyllama" --input_format=ND --input_shape="input_ids:1,1;attention_mask:1,257;position_ids:1,1;past_key_values:22,2,1,4,256,64" --log=debug --soc_version=Ascend310B4
ATC start working now, please wait for a moment.

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

start compile Ascend C operator AddCustom. kernel name is add_custom

compile Ascend C operator: AddCustom success!

...

ATC run failed, Please check the detail log, Try 'atc --help' for more information

E40021: 2025-11-02-17:28:08.334.765 Failed to compile Op [/model/Add_1]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        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[/model/Add_1] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[93]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857197389376] recompile single op[/model/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129857197389376] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        [SubGraphOpt][Compile][CompOpOnly] CompileOp failed.[FUNC:CompileOpOnly][FILE:op_compiler.cc][LINE:1119]

        [GraphOpt][FusedGraph][RunCompile] Failed to compile graph with compiler Normal mode Op Compiler[FUNC:SubGraphCompile][FILE:fe_graph_optimizer.cc][LINE:1385]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition2_rank120_new_sub_graph260[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        Failed to compile Op [/model/Add_2]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/Add_2] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[100]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        Failed to compile Op [/model/layers.0/self_attn/Add_1]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/layers.0/self_attn/Add_1] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[105]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        Failed to compile Op [/model/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[103]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129856962016832] recompile single op[/model/Add_2] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129856962016832] recompile single op[/model/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129856962016832] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition2_rank128_new_sub_graph268[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        Failed to compile Op [/model/layers.0/input_layernorm/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/layers.0/input_layernorm/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[123]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855492441664] recompile single op[/model/layers.0/input_layernorm/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129855492441664] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition2_rank94_new_sub_graph232[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        Failed to compile Op [/model/layers.0/self_attn/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/layers.0/self_attn/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[141]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129856945231424] recompile single op[/model/layers.1/self_attn/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129856945231424] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank28_new_sub_graph84[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126] 

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855475656256] recompile single op[/model/layers.0/self_attn/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129855475656256] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition2_rank91_new_sub_graph202[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        subgraph 93 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:1021]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857180603968] recompile single op[/model/layers.2/self_attn/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129857180603968] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank59_new_sub_graph1182[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857205782080] recompile single op[/model/layers.0/self_attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129857205782080] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition2_rank115_new_sub_graph253[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857197389376] recompile single op[/model/layers.1/self_attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank25_new_sub_graph81[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126] 

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129856945231424] recompile single op[/model/layers.2/self_attn/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank62_new_sub_graph1185[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        Failed to compile Op [/model/layers.1/Add]. (oppath: [Compile /usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py failed with errormsg/stack: File "/usr/local/Ascend/ascend-toolkit/latest/python/site-packages/tbe/tikcpp/compile_op.py", line 2069, in _call_bisheng_regbase     

    raise Exception(f"regbase not support static_shape_flag for now!")

Exception: regbase not support static_shape_flag for now!

], optype: [AddCustom])

        Compile op[/model/layers.1/Add] failed, oppath[/usr/local/Ascend/ascend-toolkit/8.0.RC1/opp/vendors/customize/op_impl/ai_core/tbe/customize_impl/dynamic/add_custom.py], optype[AddCustom], taskID[526]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:748]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857188996672] recompile single op[/model/layers.1/post_attention_layernorm/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857188996672] recompile single op[/model/layers.1/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129857188996672] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank43_new_sub_graph1166[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855517619776] recompile single op[/model/layers.0/post_attention_layernorm/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855517619776] recompile single op[/model/layers.0/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129855517619776] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank9_new_sub_graph54[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]  

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855492441664] recompile single op[/model/layers.2/input_layernorm/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129855492441664] recompile single op[/model/layers.1/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857214174784] recompile single op[/model/layers.1/input_layernorm/Add] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ProcFailedCompTask] Thread[129857214174784] recompile single op[/model/layers.0/Add_1] failed[FUNC:ProcessAllFailedCompileTasks][FILE:tbe_op_store_adapter.cc][LINE:962]

        [SubGraphOpt][Compile][ParalCompOp] Thread[129857214174784] process fail task failed[FUNC:ParallelCompileOp][FILE:tbe_op_store_adapter.cc][LINE:1010]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank50_new_sub_graph1173[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126]

        Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition3_rank16_new_sub_graph72[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126] 

        build graph failed, graph id:0, ret:-1[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]

        GenerateOfflineModel execute failed.

我要发帖子