Skip to content

Commit df7c310

Browse files
authored
Modified to support custom all reduce by default (PaddlePaddle#3538)
1 parent 27666ee commit df7c310

15 files changed

+18
-30
lines changed

docs/best_practices/ERNIE-4.5-0.3B-Paddle.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ Add the following lines to the startup parameters
7777
```
7878
Notes:
7979
1. Usually, no additional parameters need to be set, but CUDAGraph will generate some additional memory overhead, which may need to be adjusted in some scenarios with limited memory. For detailed parameter adjustments, please refer to [GraphOptimizationBackend](../features/graph_optimization.md) for related configuration parameter descriptions
80-
2. When CUDAGraph is enabled, if running with multi-GPUs TP>1, `--enable-custom-all-reduce` must be specified at the same time.
81-
3. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
80+
2. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
8281

8382
#### 2.2.6 Rejection Sampling
8483
**Idea:**

docs/best_practices/ERNIE-4.5-21B-A3B-Paddle.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ Add the following lines to the startup parameters
8787
```
8888
Notes:
8989
1. Usually, no additional parameters need to be set, but CUDAGraph will generate some additional memory overhead, which may need to be adjusted in some scenarios with limited memory. For detailed parameter adjustments, please refer to [GraphOptimizationBackend](../features/graph_optimization.md) for related configuration parameter descriptions
90-
2. When CUDAGraph is enabled, if running with multi-GPUs TP>1, `--enable-custom-all-reduce` must be specified at the same time.
91-
3. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
90+
2. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
9291

9392
#### 2.2.6 Rejection Sampling
9493
**Idea:**

docs/best_practices/ERNIE-4.5-300B-A47B-Paddle.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,10 @@ CUDAGraph is a GPU computing acceleration technology provided by NVIDIA. It achi
132132
Add the following lines to the startup parameters
133133
```
134134
--use-cudagraph
135-
--enable-custom-all-reduce
136135
```
137136
Notes:
138137
1. Usually, no additional parameters need to be set, but CUDAGraph will generate some additional memory overhead, which may need to be adjusted in some scenarios with limited memory. For detailed parameter adjustments, please refer to [GraphOptimizationBackend](../features/graph_optimization.md) for related configuration parameter descriptions
139-
2. When CUDAGraph is enabled, if running with multi-GPUs TP>1, `--enable-custom-all-reduce` must be specified at the same time.
140-
3. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
138+
2. When CUDAGraph is enabled, the scenario of `max-model-len > 32768` is not currently supported.
141139

142140
## FAQ
143141
If you encounter any problems during use, you can refer to [FAQ](./FAQ.md).

docs/features/graph_optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ FastDeploy's `GraphOptimizationBackend` design architecture is as follows, **som
1818
## 1. GraphOptimizationBackend Current usage restrictions
1919
In the CUDAGraph multi-device inference task, you need to use the Custom all-reduce operator to perform multi-card all-reduce.
2020

21-
Before version 2.2, neither the CUDAGraph nor the Custom all-reduce operators were enabled by default. You need to add `--enable-custom-all-reduce` to the startup command to manually enable it.
21+
Before version 2.2, the CUDAGraph was not enabled by default. the Custom all-reduce operators was enabled by default.
2222

2323
### 1.1 The multi-device scene needs to be enabled Custom all-reduce
2424
The `FLAGS_max_partition_size` environment variable controls the `gridDim` execution configuration of Kernel in CascadeAppend Attention, and dynamic execution configuration will cause CUDAGraph execution to fail.

docs/parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ When using FastDeploy to deploy models (including offline inference and service
3737
| ```reasoning_parser``` | `str` | Specify the reasoning parser to extract reasoning content from model output |
3838
| ```use_cudagraph``` | `bool` | Whether to use cuda graph, default False. It is recommended to read [graph_optimization.md](./features/graph_optimization.md) carefully before opening. Custom all-reduce needs to be enabled at the same time in multi-card scenarios. |
3939
| ```graph_optimization_config``` | `dict[str]` | Can configure parameters related to calculation graph optimization, the default value is'{"use_cudagraph":false, "graph_opt_level":0, "cudagraph_capture_sizes": null }',Detailed description reference [graph_optimization.md](./features/graph_optimization.md)|
40-
| ```enable_custom_all_reduce``` | `bool` | Enable Custom all-reduce, default: False |
40+
| ```disable_custom_all_reduce``` | `bool` | Disable Custom all-reduce, default: False |
4141
| ```splitwise_role``` | `str` | Whether to enable splitwise inference, default value: mixed, supported parameters: ["mixed", "decode", "prefill"] |
4242
| ```innode_prefill_ports``` | `str` | Internal engine startup ports for prefill instances (only required for single-machine PD separation), default: None |
4343
| ```guided_decoding_backend``` | `str` | Specify the guided decoding backend to use, supports `auto`, `xgrammar`, `off`, default: `off` |

docs/zh/best_practices/ERNIE-4.5-0.3B-Paddle.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ CUDAGraph 是 NVIDIA 提供的一项 GPU 计算加速技术,通过将 CUDA 操
7777
```
7878
注:
7979
1. 通常情况下不需要额外设置其他参数,但CUDAGraph会产生一些额外的显存开销,在一些显存受限的场景下可能需要调整。详细的参数调整请参考[GraphOptimizationBackend](../features/graph_optimization.md) 相关配置参数说明
80-
2. 开启CUDAGraph时,如果是TP>1的多卡推理场景,需要同时指定 `--enable-custom-all-reduce`
81-
3. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
80+
2. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
8281

8382
#### 2.2.5 拒绝采样
8483
**原理:**

docs/zh/best_practices/ERNIE-4.5-21B-A3B-Paddle.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ CUDAGraph 是 NVIDIA 提供的一项 GPU 计算加速技术,通过将 CUDA 操
8787
```
8888
注:
8989
1. 通常情况下不需要额外设置其他参数,但CUDAGraph会产生一些额外的显存开销,在一些显存受限的场景下可能需要调整。详细的参数调整请参考[GraphOptimizationBackend](../features/graph_optimization.md) 相关配置参数说明
90-
2. 开启CUDAGraph时,如果是TP>1的多卡推理场景,需要同时指定 `--enable-custom-all-reduce`
91-
3. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
90+
2. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
9291

9392
#### 2.2.6 拒绝采样
9493
**原理:**

docs/zh/best_practices/ERNIE-4.5-300B-A47B-Paddle.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ CUDAGraph 是 NVIDIA 提供的一项 GPU 计算加速技术,通过将 CUDA 操
133133
在启动命令中增加
134134
```
135135
--use-cudagraph
136-
--enable-custom-all-reduce
137136
```
138137
注:
139138
1. 通常情况下不需要额外设置其他参数,但CUDAGraph会产生一些额外的显存开销,在一些显存受限的场景下可能需要调整。详细的参数调整请参考[GraphOptimizationBackend](../features/graph_optimization.md) 相关配置参数说明
140-
2. 开启CUDAGraph时,如果是TP>1的多卡推理场景,需要同时指定 `--enable-custom-all-reduce`
141-
3. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
139+
2. 开启CUDAGraph时,暂时不支持`max-model-len > 32768`的场景。
142140

143141
## 三、常见问题FAQ
144142
如果您在使用过程中遇到问题,可以在[FAQ](./FAQ.md)中查阅。

docs/zh/features/graph_optimization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FastDeploy 的 `GraphOptimizationBackend` 设计架构如下,**部分功能仍
1919
### 1.1 多卡场景需要开启 Custom all-reduce
2020
在 CUDAGraph 多卡推理任务中需要使用 Custom all-reduce 算子进行多卡 all-reduce,
2121

22-
在 2.2 版本之前,CUDAGraph Custom all-reduce 算子都未默认开启,需要在启动命令中添加 `--enable-custom-all-reduce` 手动开启
22+
在 2.2 版本之前,CUDAGraph 未默认开启,Custom all-reduce 算子默认开启
2323

2424
### 1.2 FLAGS_max_partition_size 相关的 Kernel 的动态执行配置导致 CUDAGraph 执行失败
2525
`FLAGS_max_partition_size` 环境变量控制了 CascadeAppend Attention 中 Kernel 的`gridDim` 执行配置 , 而动态的执行配置会导致 CUDAGraph 执行失败。

docs/zh/parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
| ```reasoning_parser``` | `str` | 指定要使用的推理解析器,以便从模型输出中提取推理内容 |
3636
| ```use_cudagraph``` | `bool` | 是否使用cuda graph,默认False。开启前建议仔细阅读 [graph_optimization.md](./features/graph_optimization.md),在多卡场景需要同时开启 Custom all-reduce。 |
3737
| ```graph_optimization_config``` | `dict[str]` | 可以配置计算图优化相关的参数,默认值为'{"use_cudagraph":false, "graph_opt_level":0, "cudagraph_capture_sizes": null }',详细说明参考 [graph_optimization.md](./features/graph_optimization.md)|
38-
| ```enable_custom_all_reduce``` | `bool` | 开启Custom all-reduce,默认False |
38+
| ```disable_custom_all_reduce``` | `bool` | 关闭Custom all-reduce,默认False |
3939
| ```splitwise_role``` | `str` | 是否开启splitwise推理,默认值mixed, 支持参数为["mixed", "decode", "prefill"] |
4040
| ```innode_prefill_ports``` | `str` | prefill 实例内部引擎启动端口 (仅单机PD分离需要),默认值None |
4141
| ```guided_decoding_backend``` | `str` | 指定要使用的guided decoding后端,支持 `auto``xgrammar``off`, 默认为 `off` |

0 commit comments

Comments
 (0)