Use is_flashinfer_available to replace is_hip for flashinfer check (#1596)

Co-authored-by: Zhang Liangang <liangang.zhang@intel.com>
This commit is contained in:
Lianmin Zheng
2024-10-06 22:54:05 -07:00
committed by GitHub
parent 565b05f02f
commit 6a5b352aaf
9 changed files with 29 additions and 28 deletions

View File

@@ -22,7 +22,7 @@ import random
import tempfile
from typing import List, Optional
from sglang.srt.utils import is_hip, is_ipv6, is_port_available
from sglang.srt.utils import is_flashinfer_available, is_ipv6, is_port_available
logger = logging.getLogger(__name__)
@@ -151,8 +151,7 @@ class ServerArgs:
)
self.sampling_backend = "pytorch"
# ROCm: flashinfer available later
if is_hip():
if not is_flashinfer_available():
self.attention_backend = "triton"
self.sampling_backend = "pytorch"