[Kernel] Resubmit PR 48666 - Gemma4 FP8 KV FA4 head dim 512 backend selection (#53175)

Signed-off-by: Jhao-Ting Chen <jhaotingc@nvidia.com>
This commit is contained in:
Jhao-Ting Chen
2026-09-23 20:29:06 -07:00
committed by GitHub
parent e78e367c6e
commit 4fb767ff0a
47 changed files with 241 additions and 103 deletions
+5 -1
View File
@@ -303,7 +303,11 @@ def flash_attn_supports_kv_cache_dtype(
kv_cache_block_size=kv_cache_block_size,
supports_fa4_hd256=supports_fa4_hd256,
)
return (fa_version == 3 and current_platform.is_device_capability_family(90)) or (
is_sm90 = current_platform.is_device_capability_family(90)
sm90_fp8_kv_supported = fa_version == 3 or (
fa_version == 4 and head_size in (None, 512)
)
return (sm90_fp8_kv_supported and is_sm90) or (
fa_version == 4 and current_platform.is_device_capability_family(100)
)