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

fix: expose array interface for CUDA #2327

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Mar 20, 2023

ak.index.Index(existing_index) doesn't work for CuPy arrays. We rely on being able to do this in our internal layout logic.

I think what happens is that CuPy asks NumPy to read this array, which then fails as what's returned is not a NumPy array.

We can generalise our index to expose the various array interfaces. In the longer term, we should also expose DLPack.

@agoose77 agoose77 marked this pull request as ready for review March 20, 2023 15:48
@agoose77 agoose77 requested a review from jpivarski March 20, 2023 15:48
@agoose77 agoose77 temporarily deployed to docs-preview March 20, 2023 15:51 — with GitHub Actions Inactive
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

That's a good idea.

@agoose77 agoose77 enabled auto-merge (squash) March 20, 2023 17:05
@agoose77 agoose77 disabled auto-merge March 20, 2023 17:06
@agoose77 agoose77 merged commit d96597e into main Mar 20, 2023
@agoose77 agoose77 deleted the agoose77/fix-expose-array-interface branch March 20, 2023 17:06
ianna pushed a commit that referenced this pull request Mar 21, 2023
* fix: expose array interface for CUDA

* test: cover other cases
ianna added a commit that referenced this pull request Mar 21, 2023
* feat: use cppyy for JIT

* test: convert function

* fix: cleanup

* fix: cleanup and assert check in the tests

* test: enable more tests

* fix: lower cppyy version requirement

* docs: update comments

* fix: expose array interface for CUDA (#2327)

* fix: expose array interface for CUDA

* test: cover other cases

* docs: fix pyodide (again!) (#2326

* docs: fix missing Python kernel!

* docs: fix pyodide-build

* fix: update magic function name

* fix: updated to the latest cppyy version.

* fix: pass it either by reference or by value

* fix: the minimum required cppyy version is 3.0.1

* Update src/awkward/cppyy.py

Co-authored-by: Jim Pivarski <[email protected]>

* Update src/awkward/cppyy.py

Co-authored-by: Jim Pivarski <[email protected]>

---------

Co-authored-by: Angus Hollands <[email protected]>
Co-authored-by: Jim Pivarski <[email protected]>
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