Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vllm/platforms/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ def is_kv_cache_dtype_supported(cls, kv_cache_dtype: str,
supported = flash_attn_supports_fp8()
else:
supported = True
elif attention_backend == "FLASHINFER":
supported = True
elif attention_backend == "TRITON_ATTN_VLLM_V1":
supported = cls.supports_fp8()
return supported

@classmethod
Expand Down
6 changes: 5 additions & 1 deletion vllm/v1/attention/backends/flashinfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ def __init__(self, kv_cache_spec: AttentionSpec, layer_names: list[str],
else:
assert self.kv_cache_spec.dtype == self.model_config.dtype
self.kv_cache_dtype = self.kv_cache_spec.dtype
self.q_data_type = self.kv_cache_dtype

if supports_trtllm_attention()[0]:
self.q_data_type = self.kv_cache_dtype
else:
self.q_data_type = self.model_config.dtype

self._cascade_wrapper = None # Wrapper for cascade attention

Expand Down