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
kv_coord
def kv_coord[*, depth: Int](row: UInt32, head_idx: UInt32) -> StaticTuple[UInt32, Int(3)]
Returns the 3D TMA coordinates for a KV tensor load.
Parameters:
- โdepth (
Int): Head dimension of the attention layer, in elements.
Args:
- โrow (
UInt32): Row index along the sequence dimension of the KV tensor. - โhead_idx (
UInt32): KV head index for the tensor load.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!