Skip to content

More MLX linalg#2011

Open
jessegrabowski wants to merge 8 commits intopymc-devs:v3from
jessegrabowski:more-mlx-linalg
Open

More MLX linalg#2011
jessegrabowski wants to merge 8 commits intopymc-devs:v3from
jessegrabowski:more-mlx-linalg

Conversation

@jessegrabowski
Copy link
Copy Markdown
Member

@jessegrabowski jessegrabowski commented Mar 29, 2026

Adds dispatches for:

  • Det
  • Slogdet
  • LUFactor
  • PivotToPermutation
  • QR
  • EIg
  • Eigh
  • Eigvalsh

Shockingly, MLX has no native function for calculating the determinant of a matrix. The best we can do is LU factorization -> diagonal -> log sum. I implemented that so we'd have something, rather than just erroring out uselessly.

Oh we could do better if we know the matrix is PSD, then we could do cholesky instead of LU which is a bit cheaper.

@jessegrabowski jessegrabowski force-pushed the more-mlx-linalg branch 3 times, most recently from d091723 to 8cd68d6 Compare March 30, 2026 00:57
@jessegrabowski
Copy link
Copy Markdown
Member Author

mx.linalg.eig was causing the CI runner to segfault. I could not reproduce locally, but it seems like a version issue. I conditionally skipped the test for now. There was a relevant PR that was released in version 0.30.1, but I have no evidence this fixed it and there's no issue reporting an eig segfault. The version cutoff for the test skip might be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant