[Kimi-K3] Add FlashInfer speculative KDA backend (#54255)
Signed-off-by: Duncan Moss <dmoss@nvidia.com> Co-authored-by: Roger Wang <hey@rogerw.io> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Thien Tran <gau.nernst@yahoo.com.sg>
This commit is contained in:
co-authored by
Roger Wang
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thien Tran
parent
edaf3e7b61
commit
766b4ae54c
@@ -313,6 +313,9 @@ flashinfer_xqa_batch_decode_with_kv_cache = _lazy_import_wrapper(
|
||||
"flashinfer.decode",
|
||||
"xqa_batch_decode_with_kv_cache",
|
||||
)
|
||||
flashinfer_packed_fused_kda_decode = _lazy_import_wrapper(
|
||||
"flashinfer", "packed_fused_kda_decode"
|
||||
)
|
||||
flashinfer_recurrent_kda = _lazy_import_wrapper(
|
||||
"flashinfer.kda",
|
||||
"recurrent_kda",
|
||||
@@ -337,6 +340,15 @@ def has_flashinfer_comm() -> bool:
|
||||
return has_flashinfer() and importlib.util.find_spec("flashinfer.comm") is not None
|
||||
|
||||
|
||||
@functools.cache
|
||||
def has_flashinfer_packed_fused_kda_decode() -> bool:
|
||||
"""Return whether FlashInfer's packed fused KDA decode API is available."""
|
||||
if not has_flashinfer():
|
||||
return False
|
||||
module = _get_submodule("flashinfer")
|
||||
return bool(module and callable(getattr(module, "packed_fused_kda_decode", None)))
|
||||
|
||||
|
||||
@functools.cache
|
||||
def has_flashinfer_nvlink_two_sided() -> bool:
|
||||
"""Return `True` if FlashInfer mnnvl all2all is available."""
|
||||
|
||||
Reference in New Issue
Block a user