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

This commit is contained in:
Huaiyu, Zheng
2025-09-08 13:34:20 +08:00
committed by GitHub
parent b7d1f17b8d
commit ee21817c6b
4 changed files with 43 additions and 13 deletions

View File

@@ -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,