-
Notifications
You must be signed in to change notification settings - Fork 50
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
RFC: consider adding the specialized methods for missing matrix products #877
Comments
It looks like this overlaps with |
That's exactly what I want, yes. Will these be added to the Array API? Also, will |
Great, thanks for confirming. I think what is needed first is to add those functions to other libraries. We can't standardize something that is only present in NumPy. Usually other libraries are happy to match NumPy if the API looks clean and there are no blockers like it not working well for accelerators or JITs (which I wouldn't expect to be an issue in this case). So it's "only" a matter of asking JAX, PyTorch et al. if these functions can be added and then someone implementing them. |
JAX has already added the new functions in jax-ml/jax#25390 |
We discussed this in today's community meeting. The feeling was that, beyond this not being actionable if the functions in question aren't yet present in most array libraries, it may be better to focus on Hence I propose we close this issue - I hope that's fine with you @NeilGirdhar? In case a function gets universally implemented across array libraries and it has become popular to use, we can always reconsider in the future. |
Yes, that works too! Hope you end up with a nice interface for |
Great, thanks Neil! |
Background
The
matmul
function. combines seven cases of matrix products in one function. These seven cases can be cleanly organized as examples of four possibly-vectorized operations:vector_dot
covers this perfectly)Unfortunately, the decomposition isn't clean and the last two have operations have missing vectorization cases. For example,
These would subsume cases 3 and 4.
Proposal
Consider adding
matrix_vector_mul
andvector_matrix_mul
?The text was updated successfully, but these errors were encountered: