Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for the general linear solve .
The forward saves as saved_inputs_[0] (required to build
for the adjoint solve) and the solution as
saved_output_ (required for the outer-product step that yields
). Although is technically saved by
NaryKernel when save_inputs=true, the backward never reads
it.
Math
Given upstream gradient :
Both expressions compose existing differentiable ops ([[solve_op]] / [[matmul_op]] / [[neg_op]] / [[mT_op]]) so that second-order gradients flow automatically.
References
Giles, "Collected Matrix Derivative Results for Forward and Reverse Mode Algorithmic Differentiation" (Oxford, 2008), §2.4.
Attributes
schema_v1OpSchema"solve", one saved-input slot, AmpPolicy::KeepInput — prevents a lossy autocast promotion before the LAPACK call.Instance methods
1Compute input gradients for the forward solve .
Parameters
grad_outStorageReturns
std::vector<Storage>Two-element vector {dA, dB} matching the input ordering [A=0, B=1] that NaryKernel expects, where dB = solve(Aᵀ, G) and dA = -dB @ Xᵀ.
Notes
The transpose solve solve(Aᵀ, G) performs a fresh LU
factorisation of — the forward factors are not cached.