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

Support array api #261

Merged
merged 6 commits into from
Jul 7, 2023
Merged

Support array api #261

merged 6 commits into from
Jul 7, 2023

Conversation

arogozhnikov
Copy link
Owner

Einops implements a basic set of operations based on array api:

from einops.array_api import rearrange, reduce, repeat, asnumpy, pack, unpack

cc: @shoyer @rgommers

@arogozhnikov arogozhnikov changed the title Support of array api Support array api Jul 7, 2023
@arogozhnikov arogozhnikov merged commit ae89461 into master Jul 7, 2023
8 checks passed
@arogozhnikov arogozhnikov deleted the array_api_backend branch July 7, 2023 19:42
@rgommers
Copy link

Thanks for implementing and sharing @arogozhnikov!

It looks like right now, this is one extra backend (right?). I guess/hope that in the future, when another known backend is fully compliant (e.g., numpy 2.0), it would be only extra code to support the array API standard, but it would simplify a few things.

@arogozhnikov
Copy link
Owner Author

It looks like right now, this is one extra backend (right?)

Correct, that's an additional backend with an exclusive API.

For other frameworks user would call einops.rearrange and similar

For array-api based calls user would use einops.array_api.rearrange and similar

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