Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
9c61fc22
S
Serving
项目概览
PaddlePaddle
/
Serving
接近 2 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9c61fc22
编写于
7月 02, 2021
作者:
T
Thomas Young
提交者:
GitHub
7月 02, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ud doc
ud doc
上级
88f46d95
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
13 deletion
+34
-13
README_CN.md
README_CN.md
+34
-13
未找到文件。
README_CN.md
浏览文件 @
9c61fc22
...
...
@@ -172,19 +172,40 @@ python3 -m paddle_serving_server.serve --model uci_housing_model --thread 10 --p
```
<center>
| Argument | Type | Default | Description |
| ---------------------------------------------- | ---- | ------- | ------------------------------------------------------ |
|
`thread`
| int |
`4`
| Concurrency of current service |
|
`port`
| int |
`9292`
| Exposed port of current service to users |
|
`name`
| str |
`""`
| Service name, can be used to generate HTTP request url |
|
`model`
| str |
`""`
| Path of paddle model directory to be served |
|
`mem_optim_off`
| - | - | Disable memory optimization |
|
`ir_optim`
| bool | False | Enable analysis and optimization of calculation graph |
|
`use_mkl`
(Only for cpu version) | - | - | Run inference with MKL |
|
`use_trt`
(Only for Cuda>=10.1 version) | - | - | Run inference with TensorRT |
|
`use_lite`
(Only for Intel x86 CPU or ARM CPU) | - | - | Run PaddleLite inference |
|
`use_xpu`
| - | - | Run PaddleLite inference with Baidu Kunlun XPU |
|
`precision`
| str | FP32 | Precision Mode, support FP32, FP16, INT8 |
| Argument | Type | Default | Description |
| ---------------------------------------------- | ---- | ------- | ----------------------------------------------------- |
|
`thread`
| int |
`2`
| Number of brpc service thread |
|
`op_num`
| int[]|
`0`
| Thread Number for each model in asynchronous mode |
|
`op_max_batch`
| int[]|
`32`
| Batch Number for each model in asynchronous mode |
|
`gpu_ids`
| str[]|
`"-1"`
| Gpu card id for each model |
|
`port`
| int |
`9292`
| Exposed port of current service to users |
|
`model`
| str[]|
`""`
| Path of paddle model directory to be served |
|
`mem_optim_off`
| - | - | Disable memory / graphic memory optimization |
|
`ir_optim`
| bool | False | Enable analysis and optimization of calculation graph |
|
`use_mkl`
(Only for cpu version) | - | - | Run inference with MKL |
|
`use_trt`
(Only for trt version) | - | - | Run inference with TensorRT |
|
`use_lite`
(Only for Intel x86 CPU or ARM CPU) | - | - | Run PaddleLite inference |
|
`use_xpu`
| - | - | Run PaddleLite inference with Baidu Kunlun XPU |
|
`precision`
| str | FP32 | Precision Mode, support FP32, FP16, INT8 |
|
`use_calib`
| bool | False | Only for deployment with TensorRT |
|
`gpu_multi_stream`
| bool | False | EnableGpuMultiStream to get larger QPS |
#### 异步模型的说明
异步模式适用于1、请求数量非常大的情况,2、多模型串联,想要分别指定每个模型的并发数的情况。
异步模式有助于提高Service服务的吞吐(QPS),但对于单次请求而言,时延会有少量增加。
异步模式中,每个模型会启动您指定个数的N个线程,每个线程中包含一个模型实例,换句话说每个模型相当于包含N个线程的线程池,从线程池的任务队列中取任务来执行。
异步模式中,各个RPC Server的线程只负责将Request请求放入模型线程池的任务队列中,等任务被执行完毕后,再从任务队列中取出已完成的任务。
上表中通过 --thread 10 指定的是RPC Server的线程数量,默认值为2,--op_num 指定的是各个模型的线程池中线程数N,默认值为0,表示不使用异步模式。
--op_max_batch 指定的各个模型的batch数量,默认值为32,该参数只有当--op_num不为0时才生效。
#### 当您的某个模型想使用多张GPU卡部署时.
python3 -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9292 --gpu_ids 0,1,2
#### 当您的一个服务包含两个模型部署时.
python3 -m paddle_serving_server.serve --model uci_housing_model_1 uci_housing_model_2 --thread 10 --port 9292
#### 当您的一个服务包含两个模型,且每个模型都需要指定多张GPU卡部署时.
python3 -m paddle_serving_server.serve --model uci_housing_model_1 uci_housing_model_2 --thread 10 --port 9292 --gpu_ids 0,1 1,2
#### 当您的一个服务包含两个模型,且每个模型都需要指定多张GPU卡,且需要异步模式每个模型指定不同的并发数时.
python3 -m paddle_serving_server.serve --model uci_housing_model_1 uci_housing_model_2 --thread 10 --port 9292 --gpu_ids 0,1 1,2 --op_num 4 8
</center>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录