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 thebuffer_lengthstensor (inferred).
Args:
- buffer_lengths (
TileTensor[DType.int32, BufferLengthsLayoutType, MutUntrackedOrigin]): 1Dint32tensor of per-chunk buffer lengths to be zeroed. Must haveflat_rank == 1.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!