Fix/qwen3 5 amd rope cutedsl fallback (#18753)
Co-authored-by: seungrokj <seungrok.jung@amd.com>
This commit is contained in:
@@ -45,9 +45,14 @@ from sglang.srt.utils.common import rank0_log
|
||||
|
||||
if not is_cpu() and not is_npu():
|
||||
# fix import error on CPU device, no impacts when non-CPU path
|
||||
from sglang.jit_kernel.cutedsl_gdn import (
|
||||
cutedsl_fused_sigmoid_gating_delta_rule_update,
|
||||
)
|
||||
try:
|
||||
from sglang.jit_kernel.cutedsl_gdn import (
|
||||
cutedsl_fused_sigmoid_gating_delta_rule_update,
|
||||
)
|
||||
except ModuleNotFoundError:
|
||||
# CuTe DSL path requires cuda-python (cuda.bindings.*). Keep runtime usable
|
||||
# by falling back to non-CuTe kernels when it's unavailable.
|
||||
cutedsl_fused_sigmoid_gating_delta_rule_update = None
|
||||
from sglang.srt.layers.attention.fla.chunk import chunk_gated_delta_rule
|
||||
from sglang.srt.layers.attention.fla.chunk_delta_h import (
|
||||
CHUNK_SIZE as FLA_CHUNK_SIZE,
|
||||
@@ -830,6 +835,12 @@ class GDNAttnBackend(MambaAttnBackendBase):
|
||||
), f"{self.conv_states_shape[-1]=} should be less than {FLA_CHUNK_SIZE}"
|
||||
|
||||
use_cutedsl = Envs.SGLANG_USE_CUTEDSL_GDN_DECODE.get()
|
||||
if use_cutedsl and cutedsl_fused_sigmoid_gating_delta_rule_update is None:
|
||||
rank0_log(
|
||||
"CuTe DSL GDN decode requested but unavailable "
|
||||
"(missing cuda.bindings). Falling back to FLA decode kernel."
|
||||
)
|
||||
use_cutedsl = False
|
||||
rank0_log(f"CuTe DSL GDN decode enabled: {use_cutedsl}")
|
||||
self._kernel_func = (
|
||||
cutedsl_fused_sigmoid_gating_delta_rule_update
|
||||
|
||||
Reference in New Issue
Block a user