Enum Class AttentionBackend
- All Implemented Interfaces:
Serializable, Comparable<AttentionBackend>, Constable
Pluggable attention kernel backends (SGLang-style names).
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFlashInfer paged BatchPrefill / BatchDecode.LibTorchscaled_dot_product_attention(contiguous Q/K/V). -
Method Summary
Modifier and TypeMethodDescriptionid()Config / CLI identifier (e.g.static AttentionBackendParses a config string (case-insensitive).toString()static AttentionBackendReturns the enum constant of this class with the specified name.static AttentionBackend[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TORCH_NATIVE
LibTorchscaled_dot_product_attention(contiguous Q/K/V). -
FLASHINFER
FlashInfer paged BatchPrefill / BatchDecode.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
id
-
parse
Parses a config string (case-insensitive).- Parameters:
value-torch_nativeorflashinfer.- Returns:
- matching backend.
- Throws:
IllegalArgumentException- ifvalueis unknown.
-
toString
- Overrides:
toStringin classEnum<AttentionBackend>
-