我的模型输入输出维度:
input: images tensor: float32[batch_size,3,640,640] output: output tensor: float32[batch_size,Concatoutput_dim_1,Concatoutput_dim_2] 正确的转换命令是怎么样的?
我用的模型是yolo v8,动态的输入和输出。
atc --model=auto_quant_deploy_model.onnx --framework=5 --output=auto_quant_deploy_model_dynamic --soc_version=Ascend310B4 --input_shape="images:-1,-1,-1,-1" --dynamic_dims="1,3,640,640;2,3,640,640"
ATC start working now, please wait for a moment.
......................................................................................................
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E40021: [PID: 1312877] 2025-11-26-10:28:26.838.539 Failed to compile Op [Add_536_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/utils/shape_util.py", line 187, in unify_broadcast_shapes
raise RuntimeError(
RuntimeError: ({'errCode': 'E80013', 'op_name': 'add', 'input1_shape': '8400,16800', 'input2_shape': '1,2,8400'}, 'In op[add], the inputs[8400,16800] could not be broadcast together with shapes[1,2,8400].')
], optype: [Add])
Possible Cause: Failed to compile op for some reasons.
Solution: See the host log for details, and then check the Python stack where the error log is reported.
TraceBack (most recent call last):
Pre-compile op[Add_536_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py], optype[Add], taskID[17]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
Compile operator failed, cause: Parameters check failed, detailed information: input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection..
Failed to compile Op [Sub_534_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/sub.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/dsl/classifier/broadcast_classifier.py", line 610, in _update_shape_range
raise RuntimeError(dict_args, get_error_message(dict_args))
RuntimeError: ({'errCode': 'E90001', 'detailed_cause': 'input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection.'}, 'Compile operator failed, cause: Parameters check failed, detailed information: input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection..')
], optype: [Sub])
Pre-compile op[Sub_534_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/sub.py], optype[Sub], taskID[27]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
Failed to compile Op [Mul_542_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/mul.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/utils/shape_util.py", line 187, in unify_broadcast_shapes
raise RuntimeError(
RuntimeError: ({'errCode': 'E80013', 'op_name': 'mul', 'input1_shape': '16800,8400', 'input2_shape': '1,4,16800'}, 'In op[mul], the inputs[16800,8400] could not be broadcast together with shapes[1,4,16800].')
], optype: [Mul])
Pre-compile op[Mul_542_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/mul.py], optype[Mul], taskID[34]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
[SubGraphOpt][Pre-Comp][Node Mul_542_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [34].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp][Node Sub_534_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [27].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp][Node Add_536_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [17].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp]Failed to process failed task. Thread_id is [281470916587008].[FUNC:ParallelPreCompileOp][FILE:tbe_op_store_adapter.cc][LINE:643]
[SubGraphOpt][Pre-Comp]Failed to pre-compile graph [partition1_rank15_new_sub_graph283][FUNC:PreCompileOp][FILE:op_compiler.cc][LINE:809]
Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition1_rank15_new_sub_graph283[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
subgraph 18 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:893]
build graph failed, graph id:0, ret:4294967295[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1624]
GenerateOfflineModel execute failed.
我的模型输入输出维度:
input: images tensor: float32[batch_size,3,640,640] output: output tensor: float32[batch_size,Concatoutput_dim_1,Concatoutput_dim_2] 正确的转换命令是怎么样的?
我用的模型是yolo v8,动态的输入和输出。
atc --model=auto_quant_deploy_model.onnx --framework=5 --output=auto_quant_deploy_model_dynamic --soc_version=Ascend310B4 --input_shape="images:-1,-1,-1,-1" --dynamic_dims="1,3,640,640;2,3,640,640"
ATC start working now, please wait for a moment.
......................................................................................................
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E40021: [PID: 1312877] 2025-11-26-10:28:26.838.539 Failed to compile Op [Add_536_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/utils/shape_util.py", line 187, in unify_broadcast_shapes
raise RuntimeError(
RuntimeError: ({'errCode': 'E80013', 'op_name': 'add', 'input1_shape': '8400,16800', 'input2_shape': '1,2,8400'}, 'In op[add], the inputs[8400,16800] could not be broadcast together with shapes[1,2,8400].')
], optype: [Add])
Possible Cause: Failed to compile op for some reasons.
Solution: See the host log for details, and then check the Python stack where the error log is reported.
TraceBack (most recent call last):
Pre-compile op[Add_536_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/add.py], optype[Add], taskID[17]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
Compile operator failed, cause: Parameters check failed, detailed information: input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection..
Failed to compile Op [Sub_534_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/sub.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/dsl/classifier/broadcast_classifier.py", line 610, in _update_shape_range
raise RuntimeError(dict_args, get_error_message(dict_args))
RuntimeError: ({'errCode': 'E90001', 'detailed_cause': 'input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection.'}, 'Compile operator failed, cause: Parameters check failed, detailed information: input shape error, dims in ranges: [(8400, 8400), (16800, 16800)] can not do broadcast because of shape range no intersection..')
], optype: [Sub])
Pre-compile op[Sub_534_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/sub.py], optype[Sub], taskID[27]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
Failed to compile Op [Mul_542_ascend_mbatch_batch_1]. (oppath: [Pre-compile /home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/mul.py failed with errormsg/stack: File "/home/ai/Ascend/ascend-toolkit/latest/python/site-packages/tbe/common/utils/shape_util.py", line 187, in unify_broadcast_shapes
raise RuntimeError(
RuntimeError: ({'errCode': 'E80013', 'op_name': 'mul', 'input1_shape': '16800,8400', 'input2_shape': '1,4,16800'}, 'In op[mul], the inputs[16800,8400] could not be broadcast together with shapes[1,4,16800].')
], optype: [Mul])
Pre-compile op[Mul_542_ascend_mbatch_batch_1] failed, oppath[/home/ai/Ascend/ascend-toolkit/8.2.RC1/opp/built-in/op_impl/ai_core/tbe/impl/dynamic/mul.py], optype[Mul], taskID[34]. Please check op's compilation error message.[FUNC:ReportBuildErrMessage][FILE:fusion_manager.cc][LINE:368]
[SubGraphOpt][Pre-Comp][Node Mul_542_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [34].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp][Node Sub_534_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [27].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp][Node Add_536_ascend_mbatch_batch_1] Failed to pre-compile. Tid is [281470916587008], TaskId is [17].[FUNC:ProcessFailPreCompTask][FILE:tbe_op_store_adapter.cc][LINE:299]
[SubGraphOpt][Pre-Comp]Failed to process failed task. Thread_id is [281470916587008].[FUNC:ParallelPreCompileOp][FILE:tbe_op_store_adapter.cc][LINE:643]
[SubGraphOpt][Pre-Comp]Failed to pre-compile graph [partition1_rank15_new_sub_graph283][FUNC:PreCompileOp][FILE:op_compiler.cc][LINE:809]
Call OptimizeFusedGraph failed, ret:4294967295, engine_name:AIcoreEngine, graph_name:partition1_rank15_new_sub_graph283[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:119]
subgraph 18 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:893]
build graph failed, graph id:0, ret:4294967295[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1624]
GenerateOfflineModel execute failed.