You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[main][Feature] enable prefill with mc2 with additional_config (vllm-project#11022)
### What this PR does / why we need it?
This PR adds support for reserving MC2 token capacity for prefill
batches on Ascend.
A new `additional_config` option, `enable_prefill_mc2`, is introduced.
When it is enabled, `mc2_token_capacity` is calculated based on
`max_num_batched_tokens` instead of the decode-only capacity. This
allows MC2 to be used in prefill-heavy workloads where the required
token capacity can be larger than the decode-only path.
The switch is disabled by default. It is intended as a temporary option
until MC2 operators are complete for all scenarios, after which MC2 can
be enabled by default.
### Does this PR introduce any user-facing change?
Yes.
Users can now enable prefill MC2 capacity reservation through the Ascend
`additional_config` option:
`enable_prefill_mc2: true`
By default, this option is `False`. When enabled, users should ensure
that `max_num_batched_tokens` is configured appropriately. The
documentation recommends that the maximum value of
`max_num_batched_tokens` should be `tp_size * 512`.
### How was this patch tested?
This PR was tested with:
The PR also triggered the project CI checks, including DCO, docs link
checks, E2E workflow, lint-and-select-tests, and selected tests on CPU,
310P, A2, and A3 configurations.
- vLLM version: v0.23.0
- vLLM main:
vllm-project/vllm@a30addc
---------
Signed-off-by: pppeng <liuzepeng6@huawei.com>
Signed-off-by: pppeng <372907983@qq.com>
Co-authored-by: pppeng <liuzepeng6@huawei.com>
Copy file name to clipboardExpand all lines: docs/source/user_guide/configuration/additional_config.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ The following table lists additional configuration options available in vLLM Asc
89
89
|`enable_sparse_c8`| bool |`False`| Whether to enable KV cache C8 in DSA models (e.g., DeepSeek V3.2 and GLM5). Not supported on Ascend 950 devices now |
90
90
|`c8_enable_reshape_optim`| bool |`False`| Whether to enable StoreKVBlock operator achieves acceleration under the C8 feature (this means that enable_sparse_c8 needs to be enabled). In the PD separation scenario, only the P node is enabled. |
91
91
|`enable_mc2_hierarchy_comm`| bool |`False`| Enable dispatch/combine op inter-node communication by ROCE. |
92
+
|`enable_prefill_mc2`| bool |`False`| Whether to reserve mc2_token_capacity for prefill batches. When enabled, `max_num_batched_tokens` is used to calculate the mc2_token_capacity instead of the decode-only capacity. In this scenario, the recommended maximum value of `max_num_batched_tokens` is `tp_size * 512`. This is a temporary switch; once MC2 operators are complete for all scenarios, this switch will be removed and MC2 will be enabled by default. |
92
93
|`profiling_chunk_config`| dict |`{}`| Configuration options for dynamic chunked pipeline parallel. See [Dynamic Chunked Pipeline Parallel](../feature_guide/dynamic_chunk_pipeline_parallel.md) for details. |
93
94
|`enable_balance_scheduling`| bool |`False`| Whether to enable balance scheduling. Can also be configured via the `VLLM_ASCEND_BALANCE_SCHEDULING` environment variable during the migration period. |
94
95
|`enable_flashcomm1`| bool |`False`| Whether to enable FlashComm1 optimization. Can also be configured via the `VLLM_ASCEND_ENABLE_FLASHCOMM1` environment variable during the migration period. |
0 commit comments