Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support array api #261

Merged
arogozhnikov merged 6 commits into
masterfrom
array_api_backend
Jul 7, 2023
Merged

Support array api #261
arogozhnikov merged 6 commits into
masterfrom
array_api_backend

Conversation

@arogozhnikov
Copy link
Copy Markdown
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
@arogozhnikov arogozhnikov deleted the array_api_backend branch July 7, 2023 19:42
@rgommers
Copy link
Copy Markdown

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
Copy Markdown
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