Skip to content

vllm.model_executor.warmup.flashinfer_autotune_cache

FlashInfer autotune cache helpers.

_normalize_cache_config_for_hash(cache_config)

Normalize cache config for hashing

Source code in vllm/model_executor/warmup/flashinfer_autotune_cache.py
def _normalize_cache_config_for_hash(cache_config: CacheConfig) -> CacheConfig:
    """Normalize cache config for hashing"""
    if cache_config.mamba_block_size is None and cache_config.kv_cache_layout is None:
        return cache_config
    normalized = replace(cache_config, mamba_block_size=None)
    assert normalized.kv_cache_layout is None
    return normalized