Skip to main content

Mojo struct

FlashAttentionAlgorithm

struct FlashAttentionAlgorithm

Implemented traits​

AnyType, Copyable, Defaultable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable, Writable

comptime members​

FLASH_ATTENTION_1​

comptime FLASH_ATTENTION_1 = FlashAttentionAlgorithm(1)

FLASH_ATTENTION_2​

comptime FLASH_ATTENTION_2 = FlashAttentionAlgorithm(2)

FLASH_ATTENTION_3​

comptime FLASH_ATTENTION_3 = FlashAttentionAlgorithm(3)

NAIVE​

comptime NAIVE = FlashAttentionAlgorithm(0)

Methods​

__init__​

__init__() -> Self

__init__(value: Int) -> Self

__eq__​

__eq__(self, other: Self) -> Bool

Returns:

Bool

__eq__(self, version: Int) -> Bool

Returns:

Bool

__ne__​

__ne__(self, other: Self) -> Bool

Returns:

Bool

init​

init(self, dtype: DType) -> Self

write_to​

write_to(self, mut writer: T)