[MUSA]: Add flashinfer sampling backend (#24978)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: zhiguo.qin <zhiguo.qin@mthreads.com> Co-authored-by: R0CKSTAR <yeahdongcn@gmail.com>
This commit is contained in:
co-authored by
github-actions[bot]
zhiguo.qin
R0CKSTAR
parent
d9fa84b25b
commit
897587b03a
@@ -115,7 +115,7 @@ srt_musa = [
|
||||
"sglang[runtime_common]",
|
||||
"torch",
|
||||
"torch_musa",
|
||||
"torchada>=0.1.55",
|
||||
"torchada>=0.1.56",
|
||||
"mthreads-ml-py",
|
||||
"mate>=0.2.0",
|
||||
"deep-gemm>=0.1.3",
|
||||
|
||||
@@ -20,6 +20,7 @@ from sglang.srt.utils.common import (
|
||||
crash_on_warnings,
|
||||
get_bool_env_var,
|
||||
is_cuda,
|
||||
is_musa,
|
||||
is_npu,
|
||||
)
|
||||
|
||||
@@ -33,6 +34,15 @@ if is_cuda():
|
||||
top_p_renorm_prob,
|
||||
)
|
||||
|
||||
if is_musa():
|
||||
from sgl_kernel import (
|
||||
min_p_sampling_from_probs,
|
||||
top_k_renorm_prob,
|
||||
top_k_top_p_sampling_from_probs,
|
||||
top_p_renorm_prob,
|
||||
)
|
||||
|
||||
|
||||
if is_npu():
|
||||
import torch_npu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user