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

Use context in SetInfo. #7687

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Use context in SetInfo. #7687

merged 1 commit into from
Mar 24, 2022

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Feb 21, 2022

  • Use the name Context.
  • Pass a context object into SetInfo.
  • Add context to proxy matrix.
  • Add context to iterative DMatrix.

This is to remove the use of default number of threads during SetInfo as a follow up on
removing global omp variable, while prepare for CUDA stream semantic. Currently XGBoost
uses legacy CUDA stream sync in gpu_hist, we will gradually remove
them in the future in favor of non-blocking streams.

Copy link
Member Author

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

TODOS:

  • Make sure proxy and device iterative DMatrix have valid context.
  • Figure out what's happening on windows test.

src/data/data.cc Show resolved Hide resolved
* Use the name `Context`.
* Pass a context object into `SetInfo`.
* Add context to proxy matrix.
* Add context to iterative DMatrix.

This is to remove the use of default number of threads during `SetInfo` as a follow up on
removing global omp variable, while prepare for CUDA stream semantic.  Currently XGBoost
uses legacy CUDA stream along with a device sync in `gpu_hist`, we will gradually remove
them in the future in favor of non-blocking streams.
Copy link
Member

@RAMitchell RAMitchell left a comment

Choose a reason for hiding this comment

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

LGTM.

@trivialfis trivialfis merged commit 6457559 into dmlc:master Mar 24, 2022
@trivialfis trivialfis deleted the data-ctx branch March 24, 2022 14:16
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