Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix abort issue in cpu multi-threads #11233

Merged
merged 6 commits into from
Jun 6, 2018

Conversation

tensor-tang
Copy link
Contributor

@tensor-tang tensor-tang commented Jun 6, 2018

fix #11231

The key backtrace is :

#16 0x00000000029b4640 in paddle::framework::Scope::Var (this=0x5cfd0e0, name="lstm_0.w_0")
    at /home/tangjian/paddle-docker/paddle/fluid/framework/scope.cc:55
#17 0x0000000002705d91 in paddle::framework::Executor::CreateVariables (this=0x7f07caffcab0, pdesc=...,
    scope=0x7f07b8022850, block_id=0) at /home/tangjian/paddle-docker/paddle/fluid/framework/executor.cc:94
#18 0x0000000002709942 in paddle::framework::Executor::RunPreparedContext (this=0x7f07caffcab0, ctx=0x7f07b8022990,
    scope=0x5cfd0e0, create_local_scope=true, create_vars=true)
    at /home/tangjian/paddle-docker/paddle/fluid/framework/executor.cc:316
#19 0x0000000002706597 in paddle::framework::Executor::Run (this=0x7f07caffcab0, pdesc=..., scope=0x5cfd0e0,
    block_id=0, create_local_scope=true, create_vars=true)
    at /home/tangjian/paddle-docker/paddle/fluid/framework/executor.cc:119
#20 0x00000000022e875e in paddle::inference::LoadPersistables (executor=0x7f07caffcab0, scope=0x5cfd0e0,
    main_program=..., dirname="/home/tangjian/nlp/epoch6", param_filename="")
    at /home/tangjian/paddle-docker/paddle/fluid/inference/io.cc:108
#21 0x00000000022e8c34 in paddle::inference::Load (executor=0x7f07caffcab0, scope=0x5cfd0e0,
    dirname="/home/tangjian/nlp/epoch6") at /home/tangjian/paddle-docker/paddle/fluid/inference/io.cc:124
#22 0x0000000002244eed in ThreadRunInfer (tid=5, scope=0x5cfd0e0, jobs=std::vector of length 6, capacity 6 = {...})
    at /home/tangjian/paddle-docker/paddle/fluid/inference/tests/book/test_inference_nlp.cc:111

@tensor-tang tensor-tang added the 预测 原名Inference,包含Capi预测问题等 label Jun 6, 2018
@tensor-tang
Copy link
Contributor Author

tensor-tang commented Jun 6, 2018

https://paddleci.ngrok.io/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=38034&_focus=5958

test_listen_and_serv_op .........................***Timeout 31.59 sec

Merge remote-tracking branch 'ups/develop' into multithreads
auto& sub_scope = scope->NewScope();
auto place = paddle::platform::CPUPlace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle::platform::CPUPlace place;
paddle::framework::Executor executor(place);

executor.CreateVariables(*inference_program, scope.get(), 0);
// 1. Define place, executor, scope
auto place = paddle::platform::CPUPlace();
auto executor = paddle::framework::Executor(place);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@tensor-tang tensor-tang merged commit 3a29404 into PaddlePaddle:develop Jun 6, 2018
@tensor-tang tensor-tang deleted the multithreads branch June 6, 2018 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
预测 原名Inference,包含Capi预测问题等
Projects
None yet
Development

Successfully merging this pull request may close these issues.

abort in multi-threads infer on CPU
2 participants