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

Adding auto-conversion configuration to pylibraft #1093

Closed

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Dec 13, 2022

This enables a user who might already have cupy and/or pytorch installed to be able to set a configuration globally in raft to automatically convert pylibraft.common.device_ndarray to corresponding pytorch or cupy arrays through cuda array interface. Thist just makes the interop much easier than having to document for the users how to convert between each individual library.

It would be nice if in the the future we also either added dlpack support or provided a conversion strategies for JAX and tensorflow.

@cjnolet cjnolet added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 13, 2022
@cjnolet cjnolet requested a review from a team as a code owner December 13, 2022 01:27
@cjnolet cjnolet self-assigned this Dec 13, 2022
Copy link
Member

@benfred benfred left a comment

Choose a reason for hiding this comment

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

The change here looks good - and I really like the functionality that this brings us .

Some minor comments here:

python/pylibraft/pylibraft/config.py Show resolved Hide resolved
python/pylibraft/pylibraft/config.py Outdated Show resolved Hide resolved
@cjnolet
Copy link
Member Author

cjnolet commented Dec 13, 2022

Closing this in favor of #1091

@cjnolet cjnolet closed this Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
Development

Successfully merging this pull request may close these issues.

2 participants