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

jnp.linalg.solve: fully implement batched cases #19224

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

jakevdp
Copy link
Collaborator

@jakevdp jakevdp commented Jan 5, 2024

Some cases of batched solve previously led to errors in JAX but not in NumPy, e.g.

x = np.random.rand(2, 2, 2, 2)
y = np.random.rand(2)
jnp.linalg.solve(x, y)  # error
np.linalg.solve(x, y)  # success

This PR fixes this class of error, and adds some more comprehensive tests of potentially ambiguous broadcasting semantics (cf. data-apis/array-api#285)

Related: #19221

@jakevdp jakevdp requested a review from sharadmv January 5, 2024 23:24
@jakevdp jakevdp self-assigned this Jan 5, 2024
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Jan 6, 2024
@copybara-service copybara-service bot merged commit 16699e4 into jax-ml:main Jan 7, 2024
13 checks passed
@jakevdp jakevdp deleted the batched-solve branch January 7, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants