关于onnx模型转om过程中,optype[BNInfer]算子不支持的问题
收藏回复举报
关于onnx模型转om过程中,optype[BNInfer]算子不支持的问题
t('forum.solved') 已解决
新人帖
发表于2024-10-24 13:30:39
0 查看

问题描述:在利用ATC工具将onnx模型转为om模型的过程中,出现的上述问题,经排查,将batch normalization层去掉的模型版本可以转换通过(如图所示);但业务场景的训练中,多次用到了BN层,去掉的话影响较大。

目前不知道怎么处理,希望能得到大家的帮助,提供一下思路或者教程,感谢!

错误信息:

HwHiAiUser@davinci-mini:~$ atc --model="/home/HwHiAiUser/xbModel/df_model_withBatchNormalization.onnx" --framework=5 --output="/home/HwHiAiUser/xbModel/onnx2omRes_withBatchNormalization" --soc_version=Ascend310
ATC start working now, please wait for a moment.
ATC run failed, Please check the detail log, Try 'atc --help' for more information
EZ3002: Optype [BNInfer] of Ops kernel [AIcoreEngine] is unsupported. Reason: [tbe-custom]:op type BNInfer is not found in this op store.[tbe-builtin]:[Static shape check]:format ND of input [x] is not supported. All supported data type and format of tensor input0.x is: Data Type: {DT_FLOAT16,DT_FLOAT}Format:{NC1HWC0,NC1HWC0}.
        Possible Cause: The operator type is unsupported in the operator information library due to specification mismatch.
        Solution: Submit an issue to request for support at https://gitee.com/ascend, or remove this type of operators from your model.
        TraceBack (most recent call last):
        No supported Ops kernel and engine are found for [StatefulPartitionedCall/network/sequential/layer_normalization/FusedBatchNormV3], optype [BNInfer].
        No supported Ops kernel and engine are found for [StatefulPartitionedCall/network/sequential/layer_normalization_1/FusedBatchNormV3], optype [BNInfer].
        No supported Ops kernel and engine are found for [StatefulPartitionedCall/network/sequential_1/layer_normalization_2/FusedBatchNormV3], optype [BNInfer].
        No supported Ops kernel and engine are found for [StatefulPartitionedCall/network/sequential_1/layer_normalization_3/FusedBatchNormV3], optype [BNInfer].
        build graph failed, graph id:0, ret:-1[FUNC:BuildModel][FILE:ge_generator.cc][LINE:1489]

HwHiAiUser@davinci-mini:~$ atc --model="/home/HwHiAiUser/xbModel/df_model_withoutBatchNormalization.onnx" --framework=5 --output="/home/HwHiAiUser/xbModel/onnx2omRes_withoutBatchNormalization" --soc_version=Ascend310
ATC start working now, please wait for a moment.
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 29 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 32 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 20 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 24 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 35 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 28 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 25 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 21 has been simplified
[09:39:13] reuse_coaxis_buffer.cc:140: Warning: buffer reuse index 33 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 23 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 22 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 30 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 31 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 26 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 19 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 18 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 27 has been simplified
[09:39:14] buffer_reuse_finder.cc:33: Warning: buffer reuse index 34 has been simplified
ATC run success, welcome to the next use.
W11001: Op [PartitionedCall_StatefulPartitionedCall/network/random_uniform/RandomUniform_random_uniform_38] does not hit the high-priority operator information library, which might result in compromised performance.
W11001: Op [PartitionedCall_StatefulPartitionedCall/network/random_uniform_1/RandomUniform_random_uniform_29] does not hit the high-priority operator information library, which might result in compromised performance.
W11001: Op [PartitionedCall_StatefulPartitionedCall/network/random_uniform_2/RandomUniform_random_uniform_20] does not hit the high-priority operator information library, which might result in compromised performance.

%E6%97%A0%E6%A0%87%E9%A2%98.png

我要发帖子