enable llama3.1-8B on xpu (#9434)

This commit is contained in:
Huaiyu, Zheng authored and GitHub committed 2025-09-07 22:34:20 -07:00
1 parent b7d1f17b8d
commit ee21817c6b
4 files changed
+43 -13

No files matched your search

@@ -8,10 +8,11 @@ import psutil
import torch
from sglang.srt.mem_cache.memory_pool import KVCache, MHATokenToKVPool, MLATokenToKVPool
from sglang.srt.utils import is_npu
from sglang.srt.utils import is_npu, is_xpu
_is_npu = is_npu()
if not _is_npu:
_is_xpu = is_xpu()
if not (_is_npu or _is_xpu):
from sgl_kernel.kvcacheio import (
transfer_kv_all_layer,
transfer_kv_all_layer_lf_pf,