Skip to main content

Mojo struct

OrMask

@register_passable(trivial) struct OrMask[T: MHAMask, S: MHAMask, //, lhs: T, rhs: S]

Mask that's the OR of two masks.

Implemented traits

AnyType, Copyable, MHAMask, Movable, UnknownDestructibility

Aliases

apply_log2e_after_mask

alias apply_log2e_after_mask = get_witness(T, nn::mha_mask::MHAMask, apply_log2e_after_mask) if get_witness(T, nn::mha_mask::MHAMask, apply_log2e_after_mask) else get_witness(S, nn::mha_mask::MHAMask, apply_log2e_after_mask)

mask_out_of_bound

alias mask_out_of_bound = get_witness(S, nn::mha_mask::MHAMask, mask_out_of_bound) if get_witness(T, nn::mha_mask::MHAMask, mask_out_of_bound) else get_witness(T, nn::mha_mask::MHAMask, mask_out_of_bound)

mask_safe_out_of_bounds

alias mask_safe_out_of_bounds = get_witness(S, nn::mha_mask::MHAMask, mask_safe_out_of_bounds) if get_witness(T, nn::mha_mask::MHAMask, mask_safe_out_of_bounds) else get_witness(T, nn::mha_mask::MHAMask, mask_safe_out_of_bounds)

Methods

mask

mask[dtype: DType, width: Int, //, *, element_type: DType = uint32](self, coord: IndexList[4, element_type=element_type], score_vec: SIMD[dtype, width]) -> SIMD[dtype, width]

status

status[*, element_type: DType = uint32](self, tile_offset: IndexList[2, element_type=element_type], tile_size: IndexList[2, element_type=element_type]) -> TileMaskStatus

Was this page helpful?