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

set_buffer_lengths_to_zero

def set_buffer_lengths_to_zero[BufferLengthsLayoutType: TensorLayout](buffer_lengths: TileTensor[DType.int32, BufferLengthsLayoutType, MutUntrackedOrigin])

Zeroes out every element of a 1D buffer-lengths tensor.

Used as the empty-batch fallback in mla_prefill_plan so downstream prefill iterations see no work to process.

Parameters:

  • BufferLengthsLayoutType (TensorLayout): Layout type of the buffer_lengths tensor (inferred).

Args:

Was this page helpful?