Skip to content

MLX Array API compatibility: upstream status, compatibility #450

Description

@aaishwarymishra

MLX Array API compatibility overview

This issue tracks the compatibility of MLX with the Python Array API
standard and coordinates potential changes across:

  • MLX
  • array-api-compat
  • array-api-tests
  • the Array API specification

Scope

  • Array API version:
  • MLX version/commit:
  • array-api-tests commit:
  • array-api-compat branch/commit:
  • Platform: macos

Compatibility tracking:

  1. Constants, Datatypes and Array Attributes MLX compatibility: Constants, Datatypes and Array Attributes #451
  2. Creation Methods MLX compatibility: Creation functions #452
  3. Manipulation Methods MLX compatibility: Manipulation functions #462
  4. Statistical functions MLX compatibility: Statistical functions #463

The desired endgame

Upstream has a CI job which runs array-api-tests with a list of known failures.

The test suite needs to run with ARRAY_API_TESTS_SKIP_DTYPES=float64 environment variable, and --disable-data-dependent-shapes. For example,

ARRAY_API_TESTS_SKIP_DTYPES=float64 ARRAY_API_TESTS_MODULE=mlx.core pytest array_api_tests/test_searching_functions.py -v --disable-data-dependent-shapes --max-examples=1000

Process

Use this issue an umrella issue, open individual issues for groups of tests from the test suite, edit the links into this top post into the list above. (If you cannot edit it, ping @ev-br)

Problems/failures with individual functions, as uncovered by the test suite: discuss in the sub-issues. Keep this one for general blockers.


Known blockers

  • missing __array_namespace_info__ : would be best to submit a PR upstream
  • missing .device attribute of the array object : nothing to do about it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions