[Kimi K3][Kernel] Support DS conv-state layout in fused KDA decode kernel (#53396)
Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
This commit is contained in:
@@ -153,6 +153,8 @@ def is_fused_kda_decode_supported(
|
||||
input_dtype: torch.dtype,
|
||||
conv_state_dtype: torch.dtype,
|
||||
) -> bool:
|
||||
# The fused kernel handles both conv-state cache layouts (SD and DS); the
|
||||
# inner strides are selected from the tensor at launch time.
|
||||
if (
|
||||
num_heads not in (12, 24, 48, 96)
|
||||
or head_dim != 128
|
||||
@@ -160,7 +162,6 @@ def is_fused_kda_decode_supported(
|
||||
or num_spec != 0
|
||||
or input_dtype != torch.bfloat16
|
||||
or conv_state_dtype != torch.bfloat16
|
||||
or is_conv_state_dim_first()
|
||||
or not hasattr(torch.ops._C, "fused_kda_decode")
|
||||
):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user