enable ut test for xpu devices (#11712)
Co-authored-by: jundu <jun.du@intel.com> Co-authored-by: Gao, Pengfei <pengfei.gao@intel.com>
This commit is contained in:
co-authored by
jundu
Gao, Pengfei <pengfei.gao@intel.com>
parent
0a6925639b
commit
495290aefd
@@ -17,6 +17,7 @@ from sglang.srt.mem_cache.memory_pool import HybridLinearKVPool, HybridReqToToke
|
||||
from sglang.srt.mem_cache.radix_cache import RadixKey
|
||||
from sglang.srt.sampling.sampling_params import SamplingParams
|
||||
from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler
|
||||
from sglang.srt.utils import get_device
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
|
||||
register_cuda_ci(est_time=9, suite="stage-b-test-small-1-gpu")
|
||||
@@ -39,7 +40,7 @@ class TestMamba(unittest.TestCase):
|
||||
num_layers = 48
|
||||
global_interval = 4
|
||||
dtype = torch.bfloat16
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
full_attention_layer_ids = [
|
||||
i for i in range(global_interval - 1, num_layers, global_interval)
|
||||
]
|
||||
@@ -67,7 +68,7 @@ class TestMamba(unittest.TestCase):
|
||||
max_num_reqs = 10
|
||||
mamba_cache_size = 20
|
||||
max_context_len = 128
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
global_interval = 4
|
||||
num_layers = 48
|
||||
full_attention_layer_ids = [
|
||||
@@ -152,7 +153,7 @@ class TestMamba(unittest.TestCase):
|
||||
max_num_reqs = 10
|
||||
mamba_cache_size = 20
|
||||
max_context_len = 128
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
full_attention_layer_ids = [
|
||||
i for i in range(global_interval - 1, num_layers, global_interval)
|
||||
]
|
||||
|
||||
@@ -13,6 +13,7 @@ from sglang.srt.mem_cache.memory_pool import ReqToTokenPool
|
||||
from sglang.srt.mem_cache.radix_cache import RadixKey
|
||||
from sglang.srt.mem_cache.swa_memory_pool import SWAKVPool, SWATokenToKVPoolAllocator
|
||||
from sglang.srt.mem_cache.swa_radix_cache import SWARadixCache
|
||||
from sglang.srt.utils import get_device
|
||||
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||
|
||||
register_cuda_ci(est_time=8, suite="stage-b-test-large-1-gpu")
|
||||
@@ -37,7 +38,7 @@ class TestSWA(unittest.TestCase):
|
||||
num_layers = 48
|
||||
global_interval = 4
|
||||
dtype = torch.bfloat16
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
full_attention_layer_ids = [i for i in range(0, num_layers, global_interval)]
|
||||
full_attention_layer_ids_set = set(full_attention_layer_ids)
|
||||
swa_attention_layer_ids = [
|
||||
@@ -89,7 +90,7 @@ class TestSWA(unittest.TestCase):
|
||||
num_layers = 48
|
||||
global_interval = 4
|
||||
dtype = torch.bfloat16
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
full_attention_layer_ids = [i for i in range(0, num_layers, global_interval)]
|
||||
full_attention_layer_ids_set = set(full_attention_layer_ids)
|
||||
swa_attention_layer_ids = [
|
||||
@@ -243,7 +244,7 @@ class TestSWA(unittest.TestCase):
|
||||
num_layers = 48
|
||||
global_interval = 4
|
||||
dtype = torch.bfloat16
|
||||
device = "cuda"
|
||||
device = get_device()
|
||||
full_attention_layer_ids = [i for i in range(0, num_layers, global_interval)]
|
||||
full_attention_layer_ids_set = set(full_attention_layer_ids)
|
||||
swa_attention_layer_ids = [
|
||||
|
||||
Reference in New Issue
Block a user