vllm.v1.attention.ops.segmented_attention_config
¶
Typed host configuration and selection for segmented attention.
Classes:
-
SegmentedAttentionConfig–Canonical selector and autotuner output with an explicit conversion.
-
SegmentedConfigOverrides–Partial changes to a complete configuration during startup tuning.
-
SegmentedLaunchConfig–Required launch fields, also accepted from legacy config callers.
Functions:
-
segmented_kv_upcast_mode–Read the conversion mode, including pre-mode experimental configs.
-
segmented_query_capacity–Round a supported query length to its compiled power-of-two capacity.
-
select_segmented_config–Select launch geometry and KV conversion for the attention workload.
SegmentedAttentionConfig
¶
SegmentedConfigOverrides
¶
Bases: SegmentedLaunchOptions
Partial changes to a complete configuration during startup tuning.
SegmentedLaunchConfig
¶
Bases: SegmentedLaunchOptions
Required launch fields, also accepted from legacy config callers.
_cache_config_selector(func)
¶
Keep selector argument types through functools' cache wrapper.
_long_extend_splits(base_splits, batch, query_len, seq_len, hq, hk, dim, bm, *, fp8=False)
¶
Add long-prefix parallelism while bounding the extra split workspace.
_refine_segmented_launch_config(cfg, batch, query_len, span, hq, hk, dim, fp8, native_fp8, sliding_window)
¶
Use native-friendly tiles without changing unsupported-format defaults.
_select_segmented_kv_upcast(cfg, batch, query_len, span, hq, hk, dim, sliding_window)
¶
Choose conversion for the selected layout and visible attention span.
_select_segmented_launch_config(batch, max_query_len, max_seq_len, hq, hk, dim, fp8)
¶
Choose launch geometry within the segmented workspace bounds.
segmented_kv_upcast_mode(config)
¶
Read the conversion mode, including pre-mode experimental configs.
segmented_query_capacity(max_query_len)
¶
Round a supported query length to its compiled power-of-two capacity.
select_segmented_config(batch, max_query_len, max_seq_len, hq, hk, dim, fp8, *, sliding_window=-1, native_fp8=True)
¶
Select launch geometry and KV conversion for the attention workload.