-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Python] Add low-level bindings for exporting/importing the C Device Interface #39979
Comments
pitrou
pushed a commit
that referenced
this issue
Feb 28, 2024
…evice Interface (#39980) ### Rationale for this change We have low-level methods `_import_from_c`/`_export_to_c` for the C Data Interface, we can add similar methods for the C Device data interface. Expanding the Arrow PyCapsule protocol (i.e. a better public API for other libraries) is covered by #38325. Because of that, we might not want to keep those low-level methods long term (or at least we need to have the equivalents using capsules), but for testing it's useful to already add those. ### What changes are included in this PR? Added methods to Array and RecordBatch classes. Currently import only works for CPU devices. * GitHub Issue: #39979 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
Issue resolved by pull request 39980 |
zanmato1984
pushed a commit
to zanmato1984/arrow
that referenced
this issue
Feb 28, 2024
…he C Device Interface (apache#39980) ### Rationale for this change We have low-level methods `_import_from_c`/`_export_to_c` for the C Data Interface, we can add similar methods for the C Device data interface. Expanding the Arrow PyCapsule protocol (i.e. a better public API for other libraries) is covered by apache#38325. Because of that, we might not want to keep those low-level methods long term (or at least we need to have the equivalents using capsules), but for testing it's useful to already add those. ### What changes are included in this PR? Added methods to Array and RecordBatch classes. Currently import only works for CPU devices. * GitHub Issue: apache#39979 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
This was referenced Mar 6, 2024
thisisnic
pushed a commit
to thisisnic/arrow
that referenced
this issue
Mar 8, 2024
…he C Device Interface (apache#39980) ### Rationale for this change We have low-level methods `_import_from_c`/`_export_to_c` for the C Data Interface, we can add similar methods for the C Device data interface. Expanding the Arrow PyCapsule protocol (i.e. a better public API for other libraries) is covered by apache#38325. Because of that, we might not want to keep those low-level methods long term (or at least we need to have the equivalents using capsules), but for testing it's useful to already add those. ### What changes are included in this PR? Added methods to Array and RecordBatch classes. Currently import only works for CPU devices. * GitHub Issue: apache#39979 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
jorisvandenbossche
added a commit
that referenced
this issue
Jun 19, 2024
…import on CUDA device (#40385) ### Rationale for this change Follow-up on #39979 which added `_export_to_c_device`/`_import_from_c_device` methods, but for now only for CPU devices. ### What changes are included in this PR? * Ensure `pyarrow.cuda` is imported before importing data through the C Interface, to ensure the CUDA device is registered * Add tests for exporting/importing with the device interface on CUDA ### Are these changes tested? Yes, added tests for CUDA. * GitHub Issue: #40384 Authored-by: Joris Van den Bossche <[email protected]> Signed-off-by: Joris Van den Bossche <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have low-level methods
_import_from_c
/_export_to_c
for the C Data Interface, we can add similar methods for the C Device data interface.Expanding the Arrow PyCapsule protocol (i.e. a better public API for other libraries) is covered by #38325.
The text was updated successfully, but these errors were encountered: