Skip to content
class

SolveTriangularBackward

SolveTriangularBackward

Python wrappers

Public Python APIs implemented by this engine symbol.

Autograd node for the triangular solve AX=BAX = B, wired on the operands the shape contract aligned ((batch, N, N) and (batch, N, K)).

With G=∂L/∂XG = \partial L / \partial X:

∂L∂B=A−⊤G,∂L∂A=Π ⁣(−∂L∂B X⊤) \frac{\partial L}{\partial B} = A^{-\top} G, \qquad \frac{\partial L}{\partial A} = \Pi\!\left(-\frac{\partial L}{\partial B}\, X^\top\right)

where Π\Pi keeps the triangle the forward read — the upper one when upper_, and without the diagonal when unitriangular_ (that diagonal is assumed, not read, so it takes no gradient). A⊤A^\top is triangular the other way round, so the adjoint is one more triangular solve; every step is a recorded op, so the result differentiates again.

Instance methods

2
fn

apply_for_graph

int apply_for_graph(const int & grad_out)