Skip to content

Commit 5ed12bb

Browse files
committed
Rename enable_multistream_shared_expert to enable_multistream_moe
Signed-off-by: sdmyzlp <lrwei2@petalmail.com>
1 parent d0e13fd commit 5ed12bb

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs/source/user_guide/additional_config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ The details of each config option are as follows:
3838
| Name | Type | Default | Description |
3939
| ---- | ---- | ------- | ----------- |
4040
| `enabled` | bool | `False` | Whether to enable torchair graph mode |
41+
| `enable_multistream_moe`| bool | `False` | Whether to enable multistream shared expert |
4142
| `enable_view_optimize` | bool | `True` | Whether to enable torchair view optimization |
4243
| `use_cached_graph` | bool | `False` | Whether to use cached graph |
4344
| `graph_batch_sizes` | list[int] | `[]` | The batch size for torchair graph cache |
4445
| `graph_batch_sizes_init` | bool | `False` | Init graph batch size dynamically if `graph_batch_sizes` is empty |
45-
| `enable_multistream_shared_expert`| bool | `False` | Whether to enable multistream shared expert |
4646

4747
**ascend_scheduler_config**
4848

@@ -63,7 +63,7 @@ A full example of additional configuration is as follows:
6363
"use_cached_graph": true,
6464
"graph_batch_sizes": [1, 2, 4, 8],
6565
"graph_batch_sizes_init": false,
66-
"enable_multistream_shared_expert": false
66+
"enable_multistream_moe": false
6767
},
6868
"ascend_scheduler_config": {
6969
"enabled": true,

tests/singlecard/test_ascend_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_run_with_ascend_config():
5858
"use_cached_graph": True,
5959
"graph_batch_sizes": [1, 2, 4, 8],
6060
"graph_batch_sizes_init": False,
61-
"enable_multistream_shared_expert": True,
61+
"enable_multistream_moe": True,
6262
},
6363
"ascend_scheduler_config": {
6464
"enabled": True,
@@ -79,7 +79,7 @@ def test_run_with_ascend_config():
7979
1, 2, 4, 8
8080
]
8181
assert not ascend_config.torchair_graph_config.graph_batch_sizes_init
82-
assert ascend_config.torchair_graph_config.enable_multistream_shared_expert
82+
assert ascend_config.torchair_graph_config.enable_multistream_moe
8383
assert ascend_config.ascend_scheduler_config.enabled
8484
assert ascend_config.ascend_scheduler_config.enable_chunked_prefill
8585
assert ascend_config.expert_tensor_parallel_size == 1

vllm_ascend/ascend_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def __init__(self, torchair_graph_config):
5353
"graph_batch_sizes", [])
5454
self.graph_batch_sizes_init = torchair_graph_config.get(
5555
"graph_batch_sizes_init", False)
56-
self.enable_multistream_shared_expert = torchair_graph_config.get(
57-
"enable_multistream_shared_expert", False)
56+
self.enable_multistream_moe = torchair_graph_config.get(
57+
"enable_multistream_moe", False)
5858
self.enable_view_optimize = torchair_graph_config.get(
5959
"enable_view_optimize", True)
6060

vllm_ascend/models/deepseek_v2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ def __init__(
224224

225225
ascend_config = get_ascend_config()
226226
self.torchair_graph_enabled = ascend_config.torchair_graph_config.enabled
227-
self.enable_multistream_shared_expert = \
228-
ascend_config.torchair_graph_config.enable_multistream_shared_expert
227+
self.enable_multistream_moe = \
228+
ascend_config.torchair_graph_config.enable_multistream_moe
229229

230230
def forward(
231231
self,
@@ -248,7 +248,7 @@ def forward(
248248

249249
num_tokens, hidden_size = hidden_states.shape
250250

251-
multistream = self.enable_multistream_shared_expert and not is_prefill
251+
multistream = self.enable_multistream_moe and not is_prefill
252252

253253
old_hidden_states = hidden_states.clone()
254254

vllm_ascend/ops/fused_moe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,8 @@ def __init__(
10271027

10281028
ascend_config = get_ascend_config()
10291029
self.torchair_graph_enabled = ascend_config.torchair_graph_config.enabled
1030-
self.enable_multistream_shared_expert = \
1031-
ascend_config.torchair_graph_config.enable_multistream_shared_expert
1030+
self.enable_multistream_moe = \
1031+
ascend_config.torchair_graph_config.enable_multistream_moe
10321032

10331033
if self.scoring_func != "softmax" and not self.use_grouped_topk:
10341034
raise ValueError("Only softmax scoring function is supported for "
@@ -1123,7 +1123,7 @@ def forward(self,
11231123
enable_force_load_balance=enable_force_load_balance,
11241124
**kwargs)
11251125

1126-
if self.enable_multistream_shared_expert and not is_prefill:
1126+
if self.enable_multistream_moe and not is_prefill:
11271127
hidden_states, shared_output = hidden_states
11281128

11291129
if self.dp_size > 1:
@@ -1148,6 +1148,6 @@ def forward(self,
11481148
if self.reduce_results and (self.tp_size > 1 or self.ep_size > 1):
11491149
hidden_states = tensor_model_parallel_all_reduce(hidden_states)
11501150

1151-
if self.enable_multistream_shared_expert and not is_prefill:
1151+
if self.enable_multistream_moe and not is_prefill:
11521152
return hidden_states, shared_output
11531153
return hidden_states

0 commit comments

Comments
 (0)