Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
5b73d0cd
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
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看板
提交
5b73d0cd
编写于
3月 22, 2019
作者:
W
wangguibao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add cmake option: CLIENT_ONLY - Compile client libraries and demos only
Change-Id: I3029679e261524053c00ea985cfcafb3dfb49bf6
上级
84015878
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
48 addition
and
25 deletion
+48
-25
CMakeLists.txt
CMakeLists.txt
+23
-9
doc/INSTALL.md
doc/INSTALL.md
+3
-2
sdk-cpp/demo/dense_format.cpp
sdk-cpp/demo/dense_format.cpp
+1
-1
sdk-cpp/demo/echo.cpp
sdk-cpp/demo/echo.cpp
+1
-1
sdk-cpp/demo/int64tensor_format.cpp
sdk-cpp/demo/int64tensor_format.cpp
+1
-1
sdk-cpp/demo/sparse_format.cpp
sdk-cpp/demo/sparse_format.cpp
+1
-1
sdk-cpp/demo/text_classification.cpp
sdk-cpp/demo/text_classification.cpp
+1
-1
sdk-cpp/demo/text_classification_press.cpp
sdk-cpp/demo/text_classification_press.cpp
+16
-8
sdk-cpp/demo/ximage.cpp
sdk-cpp/demo/ximage.cpp
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
5b73d0cd
...
...
@@ -43,8 +43,10 @@ set(THIRD_PARTY_PATH "${CMAKE_BINARY_DIR}/third_party" CACHE STRING
set
(
THIRD_PARTY_BUILD_TYPE Release
)
option
(
WITH_AVX
"Compile PaddlePaddle with AVX intrinsics"
${
AVX_FOUND
}
)
option
(
WITH_MKL
"Compile PaddlePaddle with MKL support."
${
AVX_FOUND
}
)
option
(
WITH_AVX
"Compile Paddle Serving with AVX intrinsics"
${
AVX_FOUND
}
)
option
(
WITH_MKL
"Compile Paddle Serving with MKL support."
${
AVX_FOUND
}
)
option
(
CLIENT_ONLY
"Compile client libraries and demos only"
FALSE
)
set
(
WITH_MKLML
${
WITH_MKL
}
)
if
(
NOT DEFINED WITH_MKLDNN
)
...
...
@@ -56,19 +58,22 @@ if (NOT DEFINED WITH_MKLDNN)
endif
()
endif
()
include
(
external/
mklml
)
include
(
external/
leveldb
)
include
(
external/zlib
)
include
(
external/boost
)
include
(
external/protobuf
)
include
(
external/brpc
)
include
(
external/gflags
)
include
(
external/glog
)
include
(
external/leveldb
)
include
(
external/protobuf
)
include
(
external/snappy
)
include
(
external/brpc
)
include
(
external/boost
)
include
(
flags
)
include
(
generic
)
include
(
flags
)
if
(
NOT CLIENT_ONLY
)
include
(
external/mklml
)
include
(
paddlepaddle
)
include
(
external/opencv
)
endif
()
include_directories
(
${
PADDLE_SERVING_SOURCE_DIR
}
)
include_directories
(
${
PADDLE_SERVING_BINARY_DIR
}
)
...
...
@@ -81,6 +86,7 @@ set(EXTERNAL_LIBS
brpc
)
if
(
WITH_MKLML
)
list
(
APPEND EXTERNAL_LIBS
${
MKLML_IOMP_LIB
}
)
endif
()
...
...
@@ -90,9 +96,17 @@ if(WITH_MKLDNN)
list
(
APPEND EXTERNAL_LIBS
${
MKLDNN_LIB
}
)
endif
()
if
(
NOT CLIENT_ONLY
)
list
(
APPEND EXTERNAL_LIBS paddlepaddle
)
list
(
APPEND EXTERNAL_LIBS opencv
)
endif
()
add_subdirectory
(
configure
)
add_subdirectory
(
pdcodegen
)
add_subdirectory
(
sdk-cpp
)
if
(
NOT CLIENT_ONLY
)
add_subdirectory
(
predictor
)
add_subdirectory
(
inferencer-fluid-cpu
)
add_subdirectory
(
serving
)
add_subdirectory
(
sdk-cpp
)
endif
(
)
doc/INSTALL.md
浏览文件 @
5b73d0cd
...
...
@@ -60,7 +60,8 @@ $ make install
因Paddle Serving依托于PaddlePaddle项目进行构建,以下编译选项其实是传递给PaddlePaddle的编译选项:
| 编译选项 | 说明|
|----------|-----|
| 编译选项 | 说明
|
|----------|-----
-
|
| WITH_AVX | Compile PaddlePaddle with AVX intrinsics |
| WITH_MKL | Compile PaddlePaddle with MKLML library |
| CLINET_ONLY | Compile client libraries and demos only |
sdk-cpp/demo/dense_format.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/dense_service.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
...
...
sdk-cpp/demo/echo.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/echo_service.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
...
...
sdk-cpp/demo/int64tensor_format.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
#include "sdk-cpp/int64tensor_service.pb.h"
...
...
sdk-cpp/demo/sparse_format.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
#include "sdk-cpp/sparse_service.pb.h"
...
...
sdk-cpp/demo/text_classification.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
#include "sdk-cpp/text_classification.pb.h"
...
...
sdk-cpp/demo/text_classification_press.cpp
浏览文件 @
5b73d0cd
...
...
@@ -19,7 +19,7 @@
#include <atomic>
#include <fstream>
#include <thread> // NOLINT
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
#include "sdk-cpp/text_classification.pb.h"
...
...
@@ -328,18 +328,26 @@ int main(int argc, char **argv) {
LOG
(
INFO
)
<<
"Total requests: "
<<
round_times
.
size
();
LOG
(
INFO
)
<<
"Max concurrency: "
<<
FLAGS_concurrency
;
LOG
(
INFO
)
<<
"Elapse ms (wall-time): "
<<
elapse_ms
;
double
qps
=
(
static_cast
<
double
>
(
count
)
/
elapse_ms
)
*
1000
;
double
qps
=
0.0
;
if
(
elapse_ms
!=
0
)
{
qps
=
(
static_cast
<
double
>
(
count
)
/
elapse_ms
)
*
1000
;
}
LOG
(
INFO
)
<<
"QPS: "
<<
qps
/
FLAGS_batch_size
<<
"/s"
;
LOG
(
INFO
)
<<
"Accuracy "
<<
static_cast
<
double
>
(
correct
)
/
count
;
LOG
(
INFO
)
<<
"Latency statistics: "
;
LOG
(
INFO
)
<<
"Average ms: "
<<
total_ms
/
round_times
.
size
();
LOG
(
INFO
)
<<
"50 percent ms: "
<<
round_times
[
percent_pos_50
];
LOG
(
INFO
)
<<
"80 percent ms: "
<<
round_times
[
percent_pos_80
];
LOG
(
INFO
)
<<
"90 percent ms: "
<<
round_times
[
percent_pos_90
];
LOG
(
INFO
)
<<
"99 percent ms: "
<<
round_times
[
percent_pos_99
];
LOG
(
INFO
)
<<
"99.9 percent ms: "
<<
round_times
[
percent_pos_999
];
if
(
round_times
.
size
()
!=
0
)
{
LOG
(
INFO
)
<<
"Average ms: "
<<
total_ms
/
round_times
.
size
();
LOG
(
INFO
)
<<
"50 percent ms: "
<<
round_times
[
percent_pos_50
];
LOG
(
INFO
)
<<
"80 percent ms: "
<<
round_times
[
percent_pos_80
];
LOG
(
INFO
)
<<
"90 percent ms: "
<<
round_times
[
percent_pos_90
];
LOG
(
INFO
)
<<
"99 percent ms: "
<<
round_times
[
percent_pos_99
];
LOG
(
INFO
)
<<
"99.9 percent ms: "
<<
round_times
[
percent_pos_999
];
}
else
{
LOG
(
INFO
)
<<
"N/A"
;
}
return
0
;
}
...
...
sdk-cpp/demo/ximage.cpp
浏览文件 @
5b73d0cd
...
...
@@ -17,7 +17,7 @@
#include <unistd.h>
#include <fstream>
#include "
predictor
/builtin_format.pb.h"
#include "
sdk-cpp
/builtin_format.pb.h"
#include "sdk-cpp/image_class.pb.h"
#include "sdk-cpp/include/common.h"
#include "sdk-cpp/include/predictor_sdk.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录