-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
模型输入:
query_vec = paddle.layer.data('query_vec', type=paddle.data_type.integer_value_sequence(DICT_SIZE))
pos_img_11wfea = paddle.layer.data('pos_img_11wfea', type=paddle.data_type.dense_vector(1024))
capi参数设置,测试batch=2,
int[] _termsids ={8,9,8,9};
int[] seq_pos_arr = {0, 2, 4};
int ins_size = 2
int IMAFEA_NUM = 1024;
paddle_arguments in_args = paddle_arguments_create_none();
paddle_arguments_resize(in_args,2);
paddle_ivector n_id_vec = paddle_ivector_create(_termsids, idsize, false, false);
paddle_arguments_set_ids(in_args, 0, n_id_vec);
paddle_ivector seq_pos = paddle_ivector_create(seq_pos_arr, sizeof(seq_pos_arr)/sizeof(int), false, false);
int rets = paddle_arguments_set_sequence_start_pos(in_args, 0, 0, seq_pos);
//对mat赋值,便于排查实际是两组一样的数据
paddle_matrix mat = paddle_matrix_create(ins_size, IMAFEA_NUM, false);
for (int j = 0; j < ins_size; j++){
paddle_real* array;
paddle_matrix_get_row(mat, j, &array);
for(uint64_t i = 0; i < IMAFEA_NUM; i++){
array[i] = _feature[i];
}
WARNING_LOG("paddle_matrix set value %d, array[0] %.4f", j, array[0]);
}
paddle_arguments_set_value(in_args, 1 , mat);
paddle_arguments out_args = paddle_arguments_create_none();
int ret = paddle_gradient_machine_forward(&_model, in_args, out_args, false);//此处出core
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/opt/compiler/gcc-4.8.2/lib/libthread_db.so.1".
Core was generated by `./bin/ximagednnq.tester'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000001d0c7f0 in ?? ()
(gdb)
(gdb) bt
#0 0x0000000001d0c7f0 in ?? ()
#1 0x00007fd7451f40f6 in paddle_gradient_machine_forward () from /home/work/liuyaping/dev2/bc_out/baidu/third-party/paddle-capi/output/so/libpaddle_capi_shared.so
#2 0x000000000048d4c3 in im::ximage_dnnq_plugin::ximagednnq_calc_q (all_fea=..., all_q=...) at baidu/personal-code/lyp-imgqdnn/src/ximagednnq.cpp:560
#3 0x0000000000540728 in im::predictor::PluginDispatcher::call_plugin_callback (this=this@entry=0x7fd6b1838130)
at baidu/im-predictor/framework-new/kernel/src/dispatcher/plugin_dispatcher.cpp:157
#4 0x0000000000540941 in im::predictor::PluginDispatcher::dispatch (this=0x7fd6b1838130, cmd=)
at baidu/im-predictor/framework-new/kernel/src/dispatcher/plugin_dispatcher.cpp:68
#5 0x0000000000508cbe in im::predictor::DispatchFilter::handle_request (this=0x7fd6b182f910, req_error_no=@0x7fd718df984c: 0)
at baidu/im-predictor/framework-new/kernel/src/request_handle_filter/dispatch_filter.cpp:58
#6 0x00000000004fa351 in im::predictor::RequestHandleFilterManager::handle_request (this=this@entry=0x21396f0, req_error_no=req_error_no@entry=@0x7fd718df984c: 0)
at baidu/im-predictor/framework-new/kernel/src/request_handle_filter/request_handle_filter_manager.cpp:129
#7 0x00000000004de977 in im::predictor::request_handle_callback () at baidu/im-predictor/framework-new/kernel/src/server/predictor_server.cpp:184
#8 0x0000000000982297 in default_native () at public/ub/ub_server/ubserver_app.cpp:340
#9 0x000000000098f803 in eppool_consume (pool=0x3154840, data=0x3154dc8) at public/ub/ub_server/eppool.cpp:749
#10 0x000000000098f4df in _eppool_workers (param=0x3154dc8) at public/ub/ub_server/eppool.cpp:696
#11 0x00007fd7582471c3 in start_thread () from /opt/compiler/gcc-4.8.2/lib/libpthread.so.0
#12 0x00007fd7446aa12d in clone () from /opt/compiler/gcc-4.8.2/lib/libc.so.6