WIP jax.numpy
array API compliance finalization
#21323
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards #21088
Changes
ArrayImpl
:__array_namespace__
propertyto_device
methoddevice
propertyjax.numpy
:__array_namespace_info__
__array_api_version__
Notes
This PR is a draft right now since we should include these changes last so as to publicly support
jax.numpy
as an array API compliant namespace. @vfdev-5 can take over this PR later once the remainder of the work is completed.This does not need to wait on all the ongoing array API related deprecations to be completed, since some of them are only required for the 2023 standard, hence we can likely adopt the 2022 standard first.
It may make sense break off the
to_device
anddevice
changes forArrayImpl
into a small separate PR, since they don't imply explicit compliance by themselves, but I wanted to keep them together in this PR in case there were any caveats wrt toArrayImpl
vsTracer
behaviors that we should discuss first (based on oldTODO
note).