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

gh-405: array API support for glass.core.algorithm #423

Open
wants to merge 7 commits into
base: saransh/array-api-test
Choose a base branch
from

Conversation

Saransh-cpp
Copy link
Member

@Saransh-cpp Saransh-cpp commented Nov 14, 2024

WIP (not draft to test array API in the CI)

Has some caveats that I am working on, but opening this PR for visibility.

Closes: #405

@Saransh-cpp Saransh-cpp self-assigned this Nov 14, 2024
@paddyroddy paddyroddy added the array-api Work is related to the Array API label Nov 14, 2024
@ntessore
Copy link
Collaborator

Perhaps, before merging any changes, we should figure out a way to

  1. get the typing done in a backend-agnostic way (see Array API: Typing #415),
  2. figure out a way to test different backends, depending on what's available on the machine running the tests (maybe scipy has cracked this particular nut).

msg = "input arrays should belong to the same array library"
raise ValueError(msg)

xp = a.__array_namespace__()
Copy link
Member

Choose a reason for hiding this comment

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

Was talking to @matt-graham and he wondered if we should be using array-api-compat here. That should solve the cupy issue. I believe only NumPy and JAX are stable at this point.

Copy link
Member Author

Choose a reason for hiding this comment

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

The CuPy support will become official in their next major release (v14) where they will start supporting NumPy v2. I hope they push the release in the next 3 months, so that we don't have to experiment with array-api-compat.

@Saransh-cpp Saransh-cpp changed the base branch from main to saransh/array-api-test November 26, 2024 15:21
@Saransh-cpp Saransh-cpp force-pushed the saransh/array-api-core branch from b67c4f5 to 6e8ef45 Compare November 26, 2024 15:21
@Saransh-cpp Saransh-cpp force-pushed the saransh/array-api-core branch from 6e8ef45 to 761795c Compare November 26, 2024 15:22
@Saransh-cpp Saransh-cpp marked this pull request as ready for review November 26, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
array-api Work is related to the Array API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array API: port straightforward functions in core.algorithm
3 participants