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!