warp.tile_upper_solve#
- warp.tile_upper_solve( ) Tile[Float, tuple[int, ...]]#
Solve
U x = zfor an upper-triangularUand returnxin a new tile.Only the upper triangle of
U, including its diagonal, is read; the strictly lower triangle is ignored.Umust be non-singular with nonzero diagonal entries.This is a cooperative operation, so every thread in the block must call it.
The right-hand side may be a 1D tile with
shape=(M,)or a 2D tile withshape=(M, NRHS), which solves for allNRHScolumns at once.Uandzmust have the same dtype, eitherfloat32orfloat64.On CUDA devices, Warp uses cuSolverDx when it is built with libmathdx and
warp.config.enable_mathdx_solver(or theenable_mathdx_solvermodule option) isTrue. Otherwise, and on the CPU, it uses a cooperative fallback implementation, which is slower than cuSolverDx on CUDA devices.- Parameters:
U – A square, non-singular, upper-triangular tile with
shape=(M, M).z – The right-hand side, a tile with
shape=(M,)orshape=(M, NRHS).
- Returns:
A new tile in shared memory with the same shape and dtype as
z, holding the solutionxofU x = z.
See
tile_lower_solve()for a usage example.