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

Array API #1022

Open
wants to merge 168 commits into
base: main
Choose a base branch
from
Open

Array API #1022

wants to merge 168 commits into from

Conversation

neosunhan
Copy link
Collaborator

@neosunhan neosunhan commented Sep 4, 2022

Description

Implement array API according to the Python array API standard (version 2021.12)

See #774 for more information.

Changes proposed:

  • In conformance with the specification, the new standard-compliant API will be offered in a new namespace. This namespace can be accessed through a method on the array object.
xp = x.__array_namespace__(api_version='2020.10')

EDIT (Claudia): This PR also introduces a workflow to test compliance whenever a PR is reviewed.
EDIT2: workflow triggered manually, API version 2023.12

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

no

skip ci

neosunhan added 30 commits June 14, 2022 18:51
This fixes a bug where negative numbers could be represented by uint8.
In cases involving large numbers where the `dtype` parameter was
unchanged, precision loss occurred due to intermediate casting
to float32 (in `__local_op`) before casting back to the original
`dtype`.

Fixed by not doing the intermediate casting.
Fixed bug in `ht.any` where `keepdim` argument was not working
when `axis=None` (same fix as 136e1b7)
f0a169b introduced a change in ht.abs where the dtype is not
promoted to float by default. This caused the tests to fail.
Copy link
Contributor

Thank you for the PR!

@mtar
Copy link
Collaborator

mtar commented Jul 16, 2024

All Linalg tests are skipped for now.

Copy link
Collaborator

@mtar mtar Jul 16, 2024

Choose a reason for hiding this comment

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

This file contains all function tests that sometimes fail and sometimes not. It skips them. Might be easier to fix later.

Copy link
Collaborator

@mtar mtar Jul 16, 2024

Choose a reason for hiding this comment

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

This file contains function tests that failed every single time. These are expected to fail again. Mostly not implemented or not compliant functions.

Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

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

Let's add @neosunhan 's name to the list of contributors . Otherwise this can be merged, great job @mtar and @neosunhan !

Copy link
Contributor

Thank you for the PR!

@ClaudiaComito ClaudiaComito modified the milestones: 1.5.0, 1.6 Oct 1, 2024
Copy link
Contributor

Thank you for the PR!

Copy link
Contributor

Thank you for the PR!

ignore coverage array_api
Copy link
Contributor

Thank you for the PR!

@mtar mtar added the PR talk label Dec 5, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Thank you for the PR!

@JuanPedroGHM JuanPedroGHM self-requested a review December 9, 2024 08:40
.github/workflows/array-api.yml Outdated Show resolved Hide resolved
@mtar mtar removed the PR talk label Dec 9, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Thank you for the PR!

@ClaudiaComito
Copy link
Contributor

How are we going to keep track of progress here? i.e. what functions are missing from the coverage, what are being worked on, etc. @mtar @JuanPedroGHM

@mtar
Copy link
Collaborator

mtar commented Dec 10, 2024

The progress is tracked in the skips.txt and xfails.txt files themselves. At the moment

  • skips.txt contains tests that sometimes failed
  • xfail.txt comprises tests that always failed

when the test suite was running.
In the end they should only have tests that we want to skip or expect to fail.

@ClaudiaComito
Copy link
Contributor

The progress is tracked in the skips.txt and xfails.txt files themselves. At the moment

* `skips.txt` contains tests that sometimes failed

* `xfail.txt` comprises tests that always failed

when the test suite was running. In the end they should only have tests that we want to skip or expect to fail.

By tracking I mean something along these lines: pytorch/pytorch#58743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants