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 struct

VBufferConfig

struct VBufferConfig[BN: Int, BK: Int, WN: Int, depth: Int]

V-role decode buffer config that iterates DRAM along the row axis.

The warp tile is [BK, depth // num_warps_n] (strip width by per-warp depth slice), the block tile is [BK, depth], and iterator_axis = 0 advances tile_idx across row strips of the DRAM tile.

Parameters​

  • ​BN (Int): Number of keys per block tile (extent along the key axis).
  • ​BK (Int): Strip width along the MMA K dimension.
  • ​WN (Int): Number of keys per warp tile.
  • ​depth (Int): Per-head depth of the KV cache (head dimension).

Implemented traits​

AnyType, ImplicitlyDeletable, KVBufferConfig

comptime members​

btile_dim0​

comptime btile_dim0 = BK

btile_dim1​

comptime btile_dim1 = depth

iterator_axis​

comptime iterator_axis = 0

wsize​

comptime wsize = VBufferConfig[BN, BK, WN, depth].wtile_dim1

wtile_dim0​

comptime wtile_dim0 = BK

wtile_dim1​

comptime wtile_dim1 = (depth // (BN // WN))

Methods​

get_wtile_coord​

static def get_wtile_coord() -> IndexList[Int(2)]

Returns:

IndexList[Int(2)]

Was this page helpful?