Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b47b67

Browse files
committed
separate unittests to increase timeout
Signed-off-by: Shiyang Chen <shiychen@nvidia.com>
1 parent33896b3 commit4b47b67

File tree

1 file changed

+57
-7
lines changed

1 file changed

+57
-7
lines changed

‎tests/unittest/_torch/thop/parallel/test_moe.py‎

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,13 +1069,36 @@ def test_autotune(self, num_tokens, hidden_size, intermediate_size,
10691069
routing_info,
10701070
use_autotune=True,
10711071
use_topk_as_input=False)
1072-
ifintermediate_size>=256:
1073-
self.run_moe_fp8_fp4_test(num_tokens,
1074-
hidden_size,
1075-
intermediate_size,
1076-
routing_info,
1077-
use_autotune=True,
1078-
use_topk_as_input=False)
1072+
1073+
@pytest.mark.parametrize("num_tokens", [1])
1074+
@pytest.mark.parametrize("hidden_size", [1024])
1075+
@pytest.mark.parametrize("intermediate_size", [384])
1076+
@pytest.mark.parametrize(
1077+
"routing_info",
1078+
[
1079+
pytest.param(
1080+
{
1081+
"num_experts":72,
1082+
"top_k":6,
1083+
"padding":8,
1084+
"n_groups":1,
1085+
"top_k_groups":1,
1086+
"routed_scaling":2.5,
1087+
"has_routing_bias":True,
1088+
"routing_method_type":RoutingMethodType.DeepSeekV3
1089+
},
1090+
id="RoutingDSlite"),
1091+
],
1092+
)
1093+
deftest_autotune_fp8_fp4(self,num_tokens,hidden_size,intermediate_size,
1094+
routing_info):
1095+
1096+
self.run_moe_fp8_fp4_test(num_tokens,
1097+
hidden_size,
1098+
intermediate_size,
1099+
routing_info,
1100+
use_autotune=True,
1101+
use_topk_as_input=False)
10791102

10801103
@pytest.mark.parametrize("num_tokens", [1,150])
10811104
@pytest.mark.parametrize("hidden_size", [1024])
@@ -1120,6 +1143,33 @@ def test_no_autotune(self, num_tokens, hidden_size, intermediate_size,
11201143
routing_info,
11211144
use_autotune=False,
11221145
use_topk_as_input=use_topk_as_input)
1146+
1147+
@pytest.mark.parametrize("num_tokens", [1])
1148+
@pytest.mark.parametrize("hidden_size", [1024])
1149+
@pytest.mark.parametrize("intermediate_size", [1024])
1150+
@pytest.mark.parametrize(
1151+
"routing_info",
1152+
[
1153+
pytest.param(
1154+
{
1155+
"num_experts":128,
1156+
"top_k":4,
1157+
"padding":8,
1158+
"n_groups":None,
1159+
"top_k_groups":None,
1160+
"routed_scaling":None,
1161+
"has_routing_bias":False,
1162+
"routing_method_type":RoutingMethodType.Renormalize
1163+
},
1164+
id="RoutingRenormalize_topk_4"),
1165+
],
1166+
)
1167+
@pytest.mark.parametrize("use_topk_as_input", [False,True],
1168+
ids=["use_score_as_input","use_topk_as_input"])
1169+
deftest_no_autotune_fp8_fp4(self,num_tokens,hidden_size,
1170+
intermediate_size,routing_info,
1171+
use_topk_as_input):
1172+
11231173
self.run_moe_fp8_fp4_test(num_tokens,
11241174
hidden_size,
11251175
intermediate_size,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp