fn
lu_solve_op
→TensorImplPtrint lu_solve_op(const int & LU, const int & pivots, const int & b)Python wrappers
Public Python APIs implemented by this engine symbol.Solve given the packed LU factors and pivot vector.
Shape
LU:(..., n, n).pivots:(..., n).b:(..., n)or(..., n, k).- Output: same shape as
b.
References
LAPACK sgetrs/dgetrs; LAPACK Users' Guide §2.5.1.
See Also
[[lu_factor_op]] : Produce the packed factors consumed here. [[solve_op]] : Differentiable one-shot solve (factor + apply).
Parameters
LUconst TensorImplPtr&Packed LU matrix of shape
(..., n, n) as returned by [[lu_factor_op]] — upper triangle holds , strict lower triangle holds the off-diagonal entries of .pivotsconst TensorImplPtr&1-based pivot indices of shape
(..., n) and dtype I32.bconst TensorImplPtr&Right-hand side of shape
(..., n) for a single RHS or (..., n, k) for simultaneous RHS columns.Returns
TensorImplPtrSolution tensor with the same shape and dtype as b.
Raises
LinAlgErrorWhen
LU or b is not a float dtype, when any argument is null, or when shapes are inconsistent with the batched solve.