IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

apply_q

def apply_q[dtype: DType, element_layout: Layout](sigma: LayoutTensor[dtype, address_space=sigma.address_space, element_layout=element_layout, layout_int_type=sigma.layout_int_type, linear_idx_type=sigma.linear_idx_type, masked=sigma.masked, alignment=sigma.alignment], A: LayoutTensor[dtype, address_space=A.address_space, element_layout=element_layout, layout_int_type=A.layout_int_type, linear_idx_type=A.linear_idx_type, masked=A.masked, alignment=A.alignment], X: LayoutTensor[dtype, address_space=X.address_space, element_layout=element_layout, layout_int_type=X.layout_int_type, linear_idx_type=X.linear_idx_type, masked=X.masked, alignment=X.alignment])

Applies the implicit Q factor stored in A and sigma after calling qr_factorization to the X matrix.

See qr_factorization for more details on the construction of the Householder reflector.