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

Make prediction thread safe. #6648

Merged
merged 3 commits into from
Jan 28, 2021
Merged

Make prediction thread safe. #6648

merged 3 commits into from
Jan 28, 2021

Conversation

trivialfis
Copy link
Member

As #6645 (comment) fixed a performance issue, the booster object in dask are no longer copied. So thread safety in predict must be guaranteed.

@trivialfis
Copy link
Member Author

trivialfis commented Jan 27, 2021

Extracted from #6638

Close #6057

@hcho3
Copy link
Collaborator

hcho3 commented Jan 27, 2021

I wonder why this change appears to break the Java package.

@trivialfis
Copy link
Member Author

@hcho3 Sorry, to split up the huge PR I have to cherry pick line by line so I just manually copied some code. Got the thread temp initialization wrong.

@trivialfis
Copy link
Member Author

The dart model is still not thread safe. That will have to be done after merging the predictors.

Copy link
Collaborator

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

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

LGTM

src/predictor/gpu_predictor.cu Outdated Show resolved Hide resolved
@trivialfis trivialfis merged commit c3c8e66 into dmlc:master Jan 28, 2021
@trivialfis trivialfis deleted the thread-safe branch January 28, 2021 15:29
@trivialfis trivialfis mentioned this pull request Feb 8, 2021
23 tasks
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.

2 participants