For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
q_num_matrix_view_rows
def q_num_matrix_view_rows[dtype: DType, //](q: TileTensor[dtype, Engine=q.Engine, address_space=q.address_space, linear_idx_type=q.linear_idx_type]) -> Int
Return the number of matrix rows when viewing Q as a 2-D tensor for TMA.
For decoding, Q is viewed as rows x depth; for prefill it is viewed as
rows x (depth * num_heads). The row count is the product of all
leading dimensions except the last two (head and depth).
Parameters:
- dtype (
DType): Element type of the query tensor.
Args:
- q (
TileTensor[dtype, Engine=q.Engine, address_space=q.address_space, linear_idx_type=q.linear_idx_type]): The queryTileTensor.
Returns:
Int: The number of logical rows in the 2-D TMA view of Q.