"git@developer.sourcefind.cn:OpenDAS/fast_rnnt.git" did not exist on "2ccbb505930e46c4a8d885f63fca4cfcf918bac1"
Unverified Commit ce869793 authored by Baizhou Zhang's avatar Baizhou Zhang Committed by GitHub
Browse files

[Fix] Set global args in cpu test (#12105)

parent 22f55e1b
...@@ -8,6 +8,7 @@ from sglang.srt.layers.rotary_embedding import ( ...@@ -8,6 +8,7 @@ from sglang.srt.layers.rotary_embedding import (
DeepseekScalingRotaryEmbedding, DeepseekScalingRotaryEmbedding,
RotaryEmbedding, RotaryEmbedding,
) )
from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler
from sglang.test.test_utils import CustomTestCase from sglang.test.test_utils import CustomTestCase
torch.manual_seed(1234) torch.manual_seed(1234)
...@@ -24,6 +25,7 @@ class TestROPE(CustomTestCase): ...@@ -24,6 +25,7 @@ class TestROPE(CustomTestCase):
k_dim = 576 k_dim = 576
rotary_dim = 64 rotary_dim = 64
is_neox_style = False is_neox_style = False
set_global_server_args_for_scheduler(ServerArgs(model_path="dummy"))
# Create cos_sin_cache # Create cos_sin_cache
freqs = torch.rand(max_pos, qk_rope_head_dim // 2) freqs = torch.rand(max_pos, qk_rope_head_dim // 2)
...@@ -95,6 +97,7 @@ class TestROPE(CustomTestCase): ...@@ -95,6 +97,7 @@ class TestROPE(CustomTestCase):
num_q_heads: int, num_q_heads: int,
num_kv_heads: int, num_kv_heads: int,
): ):
set_global_server_args_for_scheduler(ServerArgs(model_path="dummy"))
torch.manual_seed(100) torch.manual_seed(100)
rope_ref = RotaryEmbedding( rope_ref = RotaryEmbedding(
head_size, head_size,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment