Skip to content

Add an MLX Array API compatibility namespace - #1

Draft
declanhealy2 wants to merge 14 commits into
mainfrom
agent/mlx-compat-complete
Draft

Add an MLX Array API compatibility namespace#1
declanhealy2 wants to merge 14 commits into
mainfrom
agent/mlx-compat-complete

Conversation

@declanhealy2

Copy link
Copy Markdown
Owner

Summary

This adds a first-class array_api_compat.mlx namespace around the native mlx.core.array type.

The implementation deliberately follows the ownership boundaries discussed in data-apis#450:

  • small signature, keyword, dtype, and return-container adaptations live here;
  • MLX execution remains native;
  • no array subclassing or monkeypatching;
  • no hidden NumPy fallback;
  • no fabricated per-array device registry;
  • intrinsic data-dependent-shape limitations are documented as explicit conformance xfails.

Included

  • namespace discovery through array_namespace() and MLX inspection helpers;
  • creation, manipulation, reduction, searching, sorting, FFT, and linear-algebra adapters;
  • __array_namespace_info__() for the compat namespace;
  • focused MLX tests;
  • a macOS workflow running both the focused tests and the full Array API conformance suite;
  • explicit known-failure files rather than blanket skips.

Validation

The branch includes a dedicated macOS CI workflow. This PR is intentionally draft while that full conformance run is being used to refine the adapters and the known intrinsic limitations.

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.

1 participant