Mojo trait
MHAOperand
This serves as the trait to support arguments to our MHA kernel.
Implemented traits
AnyType
,
UnknownDestructibility
Aliases
dtype
alias dtype
Methods
block_paged_ptr
block_paged_ptr[tile_size: Int](self: _Self, batch_idx: SIMD[uint32, 1], start_tok_idx: SIMD[uint32, 1], head_idx: SIMD[uint32, 1], head_dim_idx: SIMD[uint32, 1] = 0) -> UnsafePointer[SIMD[get_witness(_Self, nn::mha_operand::MHAOperand, dtype), 1]]
cache_length
cache_length(self: _Self, batch_idx: Int) -> Int
Returns the length of the cache for a given batch index.
max_context_length
max_context_length(self: _Self) -> SIMD[uint32, 1]
Returns the maximum cache length in a given batch index.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!