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

Sparse arrays/matrices #765

Closed
shoyer opened this issue May 23, 2019 · 3 comments
Closed

Sparse arrays/matrices #765

shoyer opened this issue May 23, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@shoyer
Copy link
Collaborator

shoyer commented May 23, 2019

Are these in scope for JAX?

I guess the first challenge would be getting sparse arrays into XLA.

@shoyer
Copy link
Collaborator Author

shoyer commented Apr 16, 2020

Over in #1032, @Jamesthegiantpeach asked:

Any chance something like this library has been or can be used with jax?

lax_reference is an attempt to implement JAX's core logic on top of NumPy instead of XLA. In principle, I think that means that the JAX could probably work on pydata/sparse via NumPy duck typing (sparse implements NumPy's __array_function__), but on the other hand I'm also pretty sure nobody has tried it and I'm sure this code is quite stale (it does not even appear to have tests).

So one conceivable path for adding pydata/sparse integration (or integration with any other library that implements the NumPy array interface, e.g., dask.array) would be as follows:

  1. Add a code transformation for switching a JAX function from lax -> lax_reference inside a function.
  2. Add support for missing operations in lax_reference.
  3. Tests. Lots of tests.

@jakevdp
Copy link
Collaborator

jakevdp commented Oct 1, 2021

We have some experimental sparse support in JAX that is being actively developed; see https://jax.readthedocs.io/en/latest/jax.experimental.sparse.html

@jakevdp
Copy link
Collaborator

jakevdp commented May 23, 2022

I'll close this; you can follow progress in jax.experimental.sparse

@jakevdp jakevdp closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants