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

[EM] Enable access to the number of batches. #10691

Merged
merged 4 commits into from
Aug 16, 2024

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Aug 9, 2024

  • Expose NumBatches in DMatrix.
  • Small cleanup for removing legacy CUDA stream and force CUDA context initialization.
  • Purge old external memory data generation code.

The CUDA uninitialized error was observed in CTK 12.2, tested CTK 12.5 on a different machine but it's not observable there. Let's keep the stream sync here to avoid potential errors, it only runs at the beginning of a thread.

A subtle difference is that, after the PR, if an external DMatrix contains only a single batch, then the SingleColBlock would return true. Currently, it returns true regardless of where it actually contains a single block when the data type is external memory.

update: Removed the force initialization for now due to CI running CTK 11.8.

@trivialfis
Copy link
Member Author

Okay, so the CUDA error is observable on the CI as well.

@trivialfis
Copy link
Member Author

Note to myself: The GPU test is invalid in the master branch, update prediction cache simply returns false due to external memory not being supported.

@trivialfis
Copy link
Member Author

trivialfis commented Aug 13, 2024

Will wait for #10697 and test.

- Expose `NumBatches` in `DMatrix`.
- Small cleanup for removing legacy CUDA stream and force CUDA context initialization.
@trivialfis
Copy link
Member Author

cc @rongou .

// action might cause an insufficient driver version error for some reason. Lastly, it
// should work with CUDA 12.5 without any action being taken.

// dh::DefaultStream().Sync();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's needed for 12.2, but it seems fine with 12.5. However, currently the CI is running 11.8, which doesn't work with the initialization.

@trivialfis trivialfis merged commit 8d7fe26 into dmlc:master Aug 16, 2024
32 checks passed
@trivialfis trivialfis deleted the ext-n-batches branch August 16, 2024 18:59
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