使用教程中的实例,https://www.paddlepaddle.org.cn/documentation/docs/zh/advanced_guide/inference_deployment/inference/native_infer.html
运行时崩溃,提示:
../../bin/DL_test
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0630 20:23:58.625954 12735 analysis_predictor.cc:138] Profiler is deactivated, and no profiling report will be generated.
W0630 20:23:58.636548 12735 init.cc:166] AVX is available, Please re-compile on local machine
I0630 20:23:58.639274 12735 op_compatible_info.cc:201] The default operator required version is missing. Please update the model version.
I0630 20:23:58.639299 12735 analysis_predictor.cc:872] MODEL VERSION: 0.0.0
I0630 20:23:58.639310 12735 analysis_predictor.cc:874] PREDICTOR VERSION: 1.8.0
--- Running analysis [ir_graph_build_pass]
--- Running analysis [ir_graph_clean_pass]
--- Running analysis [ir_analysis_pass]
--- Running IR pass [simplify_with_basic_ops_pass]
--- 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 [fc_lstm_fuse_pass]
--- Running IR pass [mul_lstm_fuse_pass]
--- Running IR pass [fc_gru_fuse_pass]
--- Running IR pass [mul_gru_fuse_pass]
--- Running IR pass [seq_concat_fc_fuse_pass]
--- Running IR pass [fc_fuse_pass]
I0630 20:23:58.669306 12735 graph_pattern_detector.cc:101] --- 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]
I0630 20:23:58.698695 12735 graph_pattern_detector.cc:101] --- 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 [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 [ir_graph_to_program_pass]
I0630 20:23:58.714287 12735 analysis_predictor.cc:493] ======= optimize end =======
I0630 20:23:58.714377 12735 naive_executor.cc:95] --- skip [feed], feed -> x
I0630 20:23:58.715095 12735 naive_executor.cc:95] --- skip [fc_0.tmp_2], fetch -> fetch
[1] 12735 segmentation fault (core dumped) ../../bin/DL_test
经过debug,发现崩溃在这句话:
CHECK(predictor->ZeroCopyRun());
可以确定:config时设置了config->SwitchUseFeedFetchOps(false);
有解决方法/