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

Implement python array API Inspection namespace #2275

Merged
merged 11 commits into from
Jan 27, 2025

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Jan 23, 2025

The PR proposes to implement dpnp.__array_namespace_info__, what is a python array API Inspection namespace.
It is required to achieve the compliance with python array API.
The implementation leverages on appropriate namespace exposed by dpctl.tensor.

In addition, this PR makes an __array_api_version__ attribute available in dpnp. It also borrowed from dpctl.

The PR adds a dedication documentation page describing Array API standard compatibility, including reference on new dpnp.__array_namespace_info__.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

@antonwolfy antonwolfy self-assigned this Jan 23, 2025
@coveralls
Copy link
Collaborator

coveralls commented Jan 23, 2025

Coverage Status

coverage: 71.302% (+0.005%) from 71.297%
when pulling edb2428 on impl-array_namespace_info
into b72f953 on master.

@antonwolfy antonwolfy marked this pull request as ready for review January 23, 2025 18:54
@antonwolfy
Copy link
Contributor Author

Link to rendered documentation: https://intelpython.github.io/dpnp/pull/2275/reference/array_api.html

Copy link
Contributor

Array API standard conformance tests for dpnp=0.17.0dev5=py312he4f9c94_10 ran successfully.
Passed: 966
Failed: 1
Skipped: 33

Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @antonwolfy!

Copy link
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2275/index.html

Copy link
Contributor

Array API standard conformance tests for dpnp=0.17.0dev5=py312he4f9c94_17 ran successfully.
Passed: 966
Failed: 1
Skipped: 33

@antonwolfy antonwolfy merged commit 83fef36 into master Jan 27, 2025
64 of 70 checks passed
@antonwolfy antonwolfy deleted the impl-array_namespace_info branch January 27, 2025 21:40
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.

3 participants