-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Conversation
9e99eb6
to
745ce87
Compare
Okay, so the CUDA error is observable on the CI as well. |
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. |
|
- Expose `NumBatches` in `DMatrix`. - Small cleanup for removing legacy CUDA stream and force CUDA context initialization.
0c6923f
to
ae85e0d
Compare
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
There was a problem hiding this comment.
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.
NumBatches
inDMatrix
.force CUDA context initialization.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.