Paddle Apple M2 推理在执行 Predictor->Run()时出错

umuewwlo  于 5个月前  发布在  其他
关注(0)|答案(6)|浏览(53)

请提出你的问题 Please ask your question

----
OptionValue
model_filexxxx.pdmodel
params_filexxxxx.pdiparams
cpu_math_thread10
enable_mkldnnfalse
mkldnn_cache_capacity10
use_gpufalse
use_xpufalse
ir_optimtrue
ir_debugfalse
memory_optimtrue
enable_profilefalse
enable_logtrue
collect_shape_range_infofalse

paddle_inference version: 2.4.2
macOS version (13.2)

--- Running analysis [ir_graph_build_pass]
--- Running analysis [ir_analysis_pass]
--- Running IR pass [simplify_with_basic_ops_pass]
--- Running IR pass [layer_norm_fuse_pass]
---    Fused 0 subgraphs into layer_norm op.
--- Running IR pass [attention_lstm_fuse_pass]
--- Running IR pass [seqconv_eltadd_relu_fuse_pass]
--- Running IR pass [seqpool_cvm_concat_fuse_pass]
--- Running IR pass [mul_lstm_fuse_pass]
--- Running IR pass [fc_gru_fuse_pass]
---    fused 0 pairs of fc gru patterns
--- Running IR pass [mul_gru_fuse_pass]
--- Running IR pass [seq_concat_fc_fuse_pass]
--- Running IR pass [gpu_cpu_squeeze2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_reshape2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_flatten2_matmul_fuse_pass]
--- Running IR pass [matmul_v2_scale_fuse_pass]
--- Running IR pass [gpu_cpu_map_matmul_v2_to_mul_pass]
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0411 15:38:59.756526 34111808 fuse_pass_base.cc:59] ---  detected 1 subgraphs
--- Running IR pass [gpu_cpu_map_matmul_v2_to_matmul_pass]
--- Running IR pass [matmul_scale_fuse_pass]
--- Running IR pass [gpu_cpu_map_matmul_to_mul_pass]
--- Running IR pass [fc_fuse_pass]
I0411 15:38:59.759814 34111808 fuse_pass_base.cc:59] ---  detected 1 subgraphs
--- Running IR pass [repeated_fc_relu_fuse_pass]
--- Running IR pass [squared_mat_sub_fuse_pass]
--- Running IR pass [conv_bn_fuse_pass]
I0411 15:38:59.775688 34111808 fuse_pass_base.cc:59] ---  detected 14 subgraphs
--- Running IR pass [conv_eltwiseadd_bn_fuse_pass]
--- Running IR pass [conv_transpose_bn_fuse_pass]
--- Running IR pass [conv_transpose_eltwiseadd_bn_fuse_pass]
--- Running IR pass [is_test_pass]
--- Running IR pass [constant_folding_pass]
--- Running IR pass [runtime_context_cache_pass]
--- Running analysis [ir_params_sync_among_devices_pass]
--- Running analysis [adjust_cudnn_workspace_size_pass]
--- Running analysis [inference_op_replace_pass]
--- Running analysis [memory_optimize_pass]
I0411 15:38:59.791338 34111808 memory_optimize_pass.cc:219] Cluster name : depthwise_conv2d_1.tmp_0  size: 401408
I0411 15:38:59.791353 34111808 memory_optimize_pass.cc:219] Cluster name : x  size: 602112
I0411 15:38:59.791360 34111808 memory_optimize_pass.cc:219] Cluster name : conv2d_33.tmp_0  size: 1605632
I0411 15:38:59.791365 34111808 memory_optimize_pass.cc:219] Cluster name : batch_norm_25.tmp_0  size: 2048
I0411 15:38:59.791375 34111808 memory_optimize_pass.cc:219] Cluster name : batch_norm_2.tmp_2  size: 1605632
--- Running analysis [ir_graph_to_program_pass]
I0411 15:38:59.817730 34111808 analysis_predictor.cc:1318] ======= optimize end =======
I0411 15:38:59.817833 34111808 naive_executor.cc:110] ---  skip [feed], feed -> x
I0411 15:38:59.819339 34111808 naive_executor.cc:110] ---  skip [softmax_1.tmp_0], fetch -> fetch

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
kqhtkvqz

kqhtkvqz1#

可以尝试一个很小的模型去预测,看是否会出现同样的问题,如果只有在包含某些算子的网络中出现这个问题,估计是这个算子存在bug,
另外,可以尝试gdb工具调试,根据问题出现哪里 gdb --args your command

再另外,可能是内存问题,重启机器试试

q9yhzks0

q9yhzks02#

应该不太像,PaddleOCR的python版本在M2上执行也是失败的

nimxete2

nimxete23#

我也有类似问题 按照 https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/macos-pip.html 安装到 mac m1 但是运行的时候 总是 “Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)”.

esyap4oy

esyap4oy4#

我的也是,paddle.utils.run_check()没问题,运行模型预测就会崩溃

hs1ihplo

hs1ihplo5#

papddle百度开发的维护问题不太积极,都快1年了

lnlaulya

lnlaulya6#

C [libpaddle_inference.dylib+0x3df1ae8] 中。Lsgemm_tcopy_L8_M16_20+0x48
会在这一步报错 之前是好的 macos 应该是发了个补丁一个系统自带的调整了
这项目一直不处理 刚出现的时候我就反馈了 到现在也没人处理

相关问题