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 multi-thread exec of trt, test=release/1.5 #19379

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

Shixiaowei02
Copy link
Contributor

[Cherry-pick of commit e1eca83, test=release/1.5]

The problem is only triggered by TensorRT and Clone(), and the user feedbacks that using version 1.4 can avoid this problem. There are two reasons for the final confirmation:

TensorRT uses the uniqueness of the molecular graph of the predictor_id area. Predictor::Clone() will change the predictor_id value, but the logic of TensorRT subgraph passes the predictor_id by value when Pass, and the Clone() does not re-trigger Pass, so the uniqueness fails.
Prior to commit ae576f3, the Deserialize() call to the TensorRT subgraph occurred at tensorrt_engine_op.h, once for each cloned-predictor. After this commit, the call occurred at tensorrt_subgraph_pass.cc, only once in ir_pass of master-predictor.
This pull request fixed the bug.

NHZlX
NHZlX previously approved these changes Aug 26, 2019
Copy link
Contributor

@NHZlX NHZlX left a comment

Choose a reason for hiding this comment

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

LGTM

@Shixiaowei02 Shixiaowei02 merged commit dd3c242 into PaddlePaddle:release/1.5 Aug 28, 2019
@Shixiaowei02 Shixiaowei02 deleted the 1.5_fix/trt branch August 28, 2019 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants