cleanup deps 2/n (#4464)

This commit is contained in:
Yineng Zhang
2025-03-15 23:06:17 -07:00
committed by GitHub
parent 2c4f5ccac1
commit 65b7c9b78f
4 changed files with 47 additions and 24 deletions

View File

@@ -23,7 +23,9 @@ import torch.nn.functional as F
from sglang.srt.utils import is_cuda_available
if is_cuda_available():
_is_cuda = is_cuda_available()
if _is_cuda:
from sgl_kernel import gelu_and_mul, gelu_tanh_and_mul, silu_and_mul
from sglang.srt.custom_op import CustomOp
@@ -165,7 +167,7 @@ def get_act_fn(
return act_fn
if not is_cuda_available():
if not _is_cuda:
logger.info(
"sgl-kernel is not available on Non-NV platforms. Fallback to other kernel libraries."
)