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

naive_gemv

def naive_gemv(c_buf: TileTensor[Storage=c_buf.Storage, address_space=c_buf.address_space, linear_idx_type=c_buf.linear_idx_type], a_buf: TileTensor[Storage=a_buf.Storage, address_space=a_buf.address_space, linear_idx_type=a_buf.linear_idx_type], b_buf: TileTensor[Storage=b_buf.Storage, address_space=b_buf.address_space, linear_idx_type=b_buf.linear_idx_type])

Computes a reference matrix-vector product C = A * b using a scalar nested loop.

Iterates over K then M, accumulating each A[m, k] * b[k] into c[m]. Intended for correctness testing rather than performance-critical paths.

Args: