Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
ce869793
Unverified
Commit
ce869793
authored
Oct 24, 2025
by
Baizhou Zhang
Committed by
GitHub
Oct 24, 2025
Browse files
[Fix] Set global args in cpu test (#12105)
parent
22f55e1b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
test/srt/cpu/test_rope.py
test/srt/cpu/test_rope.py
+3
-0
No files found.
test/srt/cpu/test_rope.py
View file @
ce869793
...
...
@@ -8,6 +8,7 @@ from sglang.srt.layers.rotary_embedding import (
DeepseekScalingRotaryEmbedding
,
RotaryEmbedding
,
)
from
sglang.srt.server_args
import
ServerArgs
,
set_global_server_args_for_scheduler
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
1234
)
...
...
@@ -24,6 +25,7 @@ class TestROPE(CustomTestCase):
k_dim
=
576
rotary_dim
=
64
is_neox_style
=
False
set_global_server_args_for_scheduler
(
ServerArgs
(
model_path
=
"dummy"
))
# Create cos_sin_cache
freqs
=
torch
.
rand
(
max_pos
,
qk_rope_head_dim
//
2
)
...
...
@@ -95,6 +97,7 @@ class TestROPE(CustomTestCase):
num_q_heads
:
int
,
num_kv_heads
:
int
,
):
set_global_server_args_for_scheduler
(
ServerArgs
(
model_path
=
"dummy"
))
torch
.
manual_seed
(
100
)
rope_ref
=
RotaryEmbedding
(
head_size
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment