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
0e05fe8c
Unverified
Commit
0e05fe8c
authored
Jun 26, 2025
by
YanbingJiang
Committed by
GitHub
Jun 25, 2025
Browse files
Update seed in CPU UTs to avoid flaky failure with single test (#7544)
parent
2390a2bc
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
11 additions
and
11 deletions
+11
-11
test/srt/cpu/test_activation.py
test/srt/cpu/test_activation.py
+1
-1
test/srt/cpu/test_decode.py
test/srt/cpu/test_decode.py
+1
-1
test/srt/cpu/test_extend.py
test/srt/cpu/test_extend.py
+1
-1
test/srt/cpu/test_gemm.py
test/srt/cpu/test_gemm.py
+1
-1
test/srt/cpu/test_mla.py
test/srt/cpu/test_mla.py
+1
-1
test/srt/cpu/test_moe.py
test/srt/cpu/test_moe.py
+1
-1
test/srt/cpu/test_norm.py
test/srt/cpu/test_norm.py
+1
-1
test/srt/cpu/test_qkv_proj_with_rope.py
test/srt/cpu/test_qkv_proj_with_rope.py
+1
-1
test/srt/cpu/test_rope.py
test/srt/cpu/test_rope.py
+1
-1
test/srt/cpu/test_shared_expert.py
test/srt/cpu/test_shared_expert.py
+1
-1
test/srt/cpu/test_topk.py
test/srt/cpu/test_topk.py
+1
-1
No files found.
test/srt/cpu/test_activation.py
View file @
0e05fe8c
...
@@ -8,7 +8,7 @@ from utils import SiluAndMul, precision
...
@@ -8,7 +8,7 @@ from utils import SiluAndMul, precision
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestActivation
(
CustomTestCase
):
class
TestActivation
(
CustomTestCase
):
...
...
test/srt/cpu/test_decode.py
View file @
0e05fe8c
...
@@ -6,7 +6,7 @@ from torch.nn.functional import scaled_dot_product_attention
...
@@ -6,7 +6,7 @@ from torch.nn.functional import scaled_dot_product_attention
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestDecodeAttention
(
CustomTestCase
):
class
TestDecodeAttention
(
CustomTestCase
):
...
...
test/srt/cpu/test_extend.py
View file @
0e05fe8c
...
@@ -6,7 +6,7 @@ from torch.nn.functional import scaled_dot_product_attention
...
@@ -6,7 +6,7 @@ from torch.nn.functional import scaled_dot_product_attention
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestExtendAttention
(
CustomTestCase
):
class
TestExtendAttention
(
CustomTestCase
):
...
...
test/srt/cpu/test_gemm.py
View file @
0e05fe8c
...
@@ -14,7 +14,7 @@ from utils import (
...
@@ -14,7 +14,7 @@ from utils import (
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
Mod
(
nn
.
Module
):
class
Mod
(
nn
.
Module
):
...
...
test/srt/cpu/test_mla.py
View file @
0e05fe8c
...
@@ -8,7 +8,7 @@ from utils import precision
...
@@ -8,7 +8,7 @@ from utils import precision
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestMLA
(
CustomTestCase
):
class
TestMLA
(
CustomTestCase
):
...
...
test/srt/cpu/test_moe.py
View file @
0e05fe8c
...
@@ -8,7 +8,7 @@ import torch
...
@@ -8,7 +8,7 @@ import torch
kernel
=
torch
.
ops
.
sgl_kernel
kernel
=
torch
.
ops
.
sgl_kernel
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
from
utils
import
(
from
utils
import
(
BLOCK_K
,
BLOCK_K
,
...
...
test/srt/cpu/test_norm.py
View file @
0e05fe8c
...
@@ -8,7 +8,7 @@ from utils import make_non_contiguous, precision
...
@@ -8,7 +8,7 @@ from utils import make_non_contiguous, precision
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestNorm
(
CustomTestCase
):
class
TestNorm
(
CustomTestCase
):
...
...
test/srt/cpu/test_qkv_proj_with_rope.py
View file @
0e05fe8c
...
@@ -15,7 +15,7 @@ from sglang.test.test_utils import CustomTestCase
...
@@ -15,7 +15,7 @@ from sglang.test.test_utils import CustomTestCase
convert_weight_packed
=
torch
.
ops
.
sgl_kernel
.
convert_weight_packed
convert_weight_packed
=
torch
.
ops
.
sgl_kernel
.
convert_weight_packed
qkv_proj_with_rope
=
torch
.
ops
.
sgl_kernel
.
qkv_proj_with_rope
qkv_proj_with_rope
=
torch
.
ops
.
sgl_kernel
.
qkv_proj_with_rope
qkv_proj_with_rope_fused_weight
=
torch
.
ops
.
sgl_kernel
.
qkv_proj_with_rope_fused_weight
qkv_proj_with_rope_fused_weight
=
torch
.
ops
.
sgl_kernel
.
qkv_proj_with_rope_fused_weight
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
# constants
# constants
kv_lora_rank
=
512
kv_lora_rank
=
512
qk_head_dim
=
192
qk_head_dim
=
192
...
...
test/srt/cpu/test_rope.py
View file @
0e05fe8c
...
@@ -10,7 +10,7 @@ from sglang.srt.layers.rotary_embedding import (
...
@@ -10,7 +10,7 @@ from sglang.srt.layers.rotary_embedding import (
)
)
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestROPE
(
CustomTestCase
):
class
TestROPE
(
CustomTestCase
):
...
...
test/srt/cpu/test_shared_expert.py
View file @
0e05fe8c
...
@@ -22,7 +22,7 @@ from utils import (
...
@@ -22,7 +22,7 @@ from utils import (
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
class
TestSharedExpert
(
CustomTestCase
):
class
TestSharedExpert
(
CustomTestCase
):
...
...
test/srt/cpu/test_topk.py
View file @
0e05fe8c
...
@@ -13,7 +13,7 @@ from sglang.srt.layers.moe.topk import grouped_topk_gpu as native_grouped_topk
...
@@ -13,7 +13,7 @@ from sglang.srt.layers.moe.topk import grouped_topk_gpu as native_grouped_topk
from
sglang.srt.models.llama4
import
Llama4MoE
from
sglang.srt.models.llama4
import
Llama4MoE
from
sglang.test.test_utils
import
CustomTestCase
from
sglang.test.test_utils
import
CustomTestCase
torch
.
manual_seed
(
0
)
torch
.
manual_seed
(
1234
)
# This is used by the Deepseek-V2 model
# This is used by the Deepseek-V2 model
...
...
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