mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
CPU LU factorization and linear solvers (#1451)
* linalg solve backend * nits * more nits + fix * luf primitive and lu, solve, and solve_triangular backends * changes / nits --------- Co-authored-by: Awni Hannun <awni@apple.com>
This commit is contained in:
12
mlx/linalg.h
12
mlx/linalg.h
@@ -74,6 +74,18 @@ array pinv(const array& a, StreamOrDevice s = {});
|
||||
|
||||
array cholesky_inv(const array& a, bool upper = false, StreamOrDevice s = {});
|
||||
|
||||
std::vector<array> lu(const array& a, StreamOrDevice s = {});
|
||||
|
||||
std::pair<array, array> lu_factor(const array& a, StreamOrDevice s = {});
|
||||
|
||||
array solve(const array& a, const array& b, StreamOrDevice s = {});
|
||||
|
||||
array solve_triangular(
|
||||
const array& a,
|
||||
const array& b,
|
||||
bool upper = false,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/**
|
||||
* Compute the cross product of two arrays along the given axis.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user