Computes the reduced QR decomposition of a matrix operand:
$$A = Q R,$$
where \(Q\) has orthonormal columns (\(Q^\top Q = I\)) and
\(R\) is upper triangular.
For an \(m \times n\) input with \(k = \min(m, n)\), \(Q\) has
shape \(m \times k\) and \(R\) has shape \(k \times n\).
Arguments
- operand
(
arrayish)
Matrix of data type floating-point with exactly 2 dimensions.
Value
Named list with elements Q (shape (m, k)) and R
(shape (k, n)), where (m, n) = shape(operand) and
k = min(m, n). Both have the same data type as operand.
StableHLO
Lowers to a "geqrf" + "orgqr" stablehlo::hlo_custom_call() pair
(backed by LAPACK on CPU and cuSOLVER on CUDA) + postprocessing.