-
Notifications
You must be signed in to change notification settings - Fork 83
Expose cuFile stream register API to Python #893
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
base: main
Are you sure you want to change the base?
Expose cuFile stream register API to Python #893
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
madsbk
left a comment
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.
We might consider using something like the following for the CUDA Stream bindings
from rmm.pylibrmm.stream import Streamhttps://docs.rapids.ai/api/rmm/stable/python/pylibrmm/#rmm.pylibrmm.stream.Stream
Co-authored-by: Mads R. B. Kristensen <[email protected]>
Co-authored-by: Mads R. B. Kristensen <[email protected]>
|
I've changed the parameter name to |
madsbk
left a comment
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.
I like the raw_stream name.
For your suggestion, do you think we need to add Python RMM dependency to KvikIO, or add KvikIO's own stream wrapper on C++ and Python level? @madsbk
At some point, yes. Or use cuda-python's CUDA stream, or roll our own :)
|
That makes sense. I've created this ticket #895 . |
This PR exposes cuFile stream register and deregister functions to KvikIO Python API.
The stream register and deregister is an optional, performance-tuning API. The users specify the precondition of the I/O parameters by setting the
flagsthat indicate when the I/O parameters become valid and whether they are page aligned.The added Python API can be unit tested using:
pytest ~/kvikio/python/kvikio/tests/test_async_io.py::test_stream_register_deregister -m cufile -vsxA known issue is that, under CUDA 12.9, which is the only setting tested, if the file path is not on a drive with full GDS support, the above unit test will pass but end with a segmentation fault. This is beyond the scope of this PR and is likely not an issue in KvikIO. Further investigation is a good-to-have.