Mojo struct
MHATileSummary
struct MHATileSummary[ValidLengthType: OptionalPointer]
Fieldsβ
- βbatch_size (
UInt32): - βmax_num_prompt_tiles (
UInt32): - βvalid_length (
ValidLengthType): - βmax_seq_len (
UInt32):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methodsβ
__init__β
__init__(batch_size: UInt32, max_num_prompt_tiles: UInt32, valid_length: ValidLengthType, max_seq_len: UInt32) -> Self
get_current_work_infoβ
get_current_work_info[tile_shape: UInt32, num_heads: UInt32, schedule: MHASchedule](self, idx: UInt32) -> WorkInfo
Returns:
get_current_work_info[tile_shape: UInt32, num_heads: UInt32, schedule: MHASchedule](self, idx: MHATileState) -> WorkInfo
Returns:
unsafe_get_current_work_infoβ
unsafe_get_current_work_info[tile_shape: UInt32, num_heads: UInt32, schedule: MHASchedule](self, idx: UInt32) -> WorkInfo
Returns:
max_idxβ
grid_dimβ
static grid_dim[num_heads: UInt32](max_num_prompt_tiles: UInt32, batch_size: UInt32) -> Tuple[Int, Int, Int]
Returns:
seq_infoβ
seq_info(self, work: WorkInfo) -> SeqInfo
Returns:
SeqInfo
unsafe_seq_infoβ
unsafe_seq_info[tile_shape: UInt32, num_heads: UInt32, schedule: MHASchedule](self, idx: UInt32) -> SeqInfo
Returns:
SeqInfo
unsafe_seq_info[tile_shape: UInt32, num_heads: UInt32, schedule: MHASchedule](self, state: MHATileState) -> SeqInfo
Returns:
SeqInfo
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!