Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
20010c1d
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看板
提交
20010c1d
编写于
3月 20, 2020
作者:
Y
Your Name
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update test script
上级
10ebca4a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
17 deletion
+18
-17
tools/serving_build.sh
tools/serving_build.sh
+18
-17
未找到文件。
tools/serving_build.sh
浏览文件 @
20010c1d
...
@@ -15,9 +15,9 @@ function check_cmd() {
...
@@ -15,9 +15,9 @@ function check_cmd() {
}
}
function
build_client
()
{
function
build_client
()
{
local
TYPE
=
$1
local
TYPE
=
$1
# pwd: /Serving
local
DIRNAME
=
build-client-
$TYPE
local
DIRNAME
=
build-client-
$TYPE
mkdir
$DIRNAME
&&
cd
$DIRNAME
mkdir
$DIRNAME
&&
cd
$DIRNAME
# pwd: /Serving/build-client-$TYPE
case
$TYPE
in
case
$TYPE
in
CPU|GPU
)
CPU|GPU
)
cmake
-DPYTHON_INCLUDE_DIR
=
$PYTHONROOT
/include/python2.7/
\
cmake
-DPYTHON_INCLUDE_DIR
=
$PYTHONROOT
/include/python2.7/
\
...
@@ -33,14 +33,14 @@ function build_client() {
...
@@ -33,14 +33,14 @@ function build_client() {
;;
;;
esac
esac
echo
"build client
$TYPE
part finished as expected."
echo
"build client
$TYPE
part finished as expected."
cd
..
cd
..
# pwd: /Serving
rm
-rf
$DIRNAME
rm
-rf
$DIRNAME
}
}
function
build_server
()
{
function
build_server
()
{
local
TYPE
=
$1
local
TYPE
=
$1
# pwd: /Serving
local
DIRNAME
=
build-server-
$TYPE
local
DIRNAME
=
build-server-
$TYPE
mkdir
$DIRNAME
&&
cd
$DIRNAME
mkdir
$DIRNAME
&&
cd
$DIRNAME
# pwd: /Serving/build-server-$TYPE
case
$TYPE
in
case
$TYPE
in
CPU
)
CPU
)
cmake
-DPYTHON_INCLUDE_DIR
=
$PYTHONROOT
/include/python2.7/
\
cmake
-DPYTHON_INCLUDE_DIR
=
$PYTHONROOT
/include/python2.7/
\
...
@@ -65,7 +65,7 @@ function build_server() {
...
@@ -65,7 +65,7 @@ function build_server() {
;;
;;
esac
esac
echo
"build server
$TYPE
part finished as expected."
echo
"build server
$TYPE
part finished as expected."
cd
..
cd
..
# pwd: /Serving
# rm -rf $DIRNAME for export SERVING_BIN
# rm -rf $DIRNAME for export SERVING_BIN
}
}
...
@@ -74,7 +74,8 @@ function kill_server_process() {
...
@@ -74,7 +74,8 @@ function kill_server_process() {
}
}
function
python_test_fit_a_line
()
{
function
python_test_fit_a_line
()
{
cd
fit_a_line
# pwd: /Serving/python/examples
cd
fit_a_line
# pwd: /Serving/python/examples/fit_a_line
sh get_data.sh
sh get_data.sh
local
TYPE
=
$1
local
TYPE
=
$1
case
$TYPE
in
case
$TYPE
in
...
@@ -123,25 +124,25 @@ function python_test_fit_a_line() {
...
@@ -123,25 +124,25 @@ function python_test_fit_a_line() {
esac
esac
echo
"test fit_a_line
$TYPE
part finished as expected."
echo
"test fit_a_line
$TYPE
part finished as expected."
rm
-rf
image kvdb log uci_housing
*
work
*
rm
-rf
image kvdb log uci_housing
*
work
*
cd
..
cd
..
# pwd: /Serving/python/examples
}
}
function
python_run_test
()
{
function
python_run_test
()
{
# Using the compiled binary
# Using the compiled binary
local
TYPE
=
$1
local
TYPE
=
$1
# pwd: /Serving
export
SERVING_BIN
=
$PWD
/build-server-
${
TYPE
}
/core/general-server/serving
export
SERVING_BIN
=
$PWD
/build-server-
${
TYPE
}
/core/general-server/serving
cd
python/examples
cd
python/examples
# pwd: /Serving/python/examples
python_test_fit_a_line
$TYPE
python_test_fit_a_line
$TYPE
# pwd: /Serving/python/examples
echo
"test python
$TYPE
part finished as expected."
echo
"test python
$TYPE
part finished as expected."
cd
../..
cd
../..
# pwd: /Serving
}
}
function
main
()
{
function
main
()
{
local
TYPE
=
$1
local
TYPE
=
$1
# pwd: /
init
init
# pwd: /Serving
build_client
$TYPE
build_client
$TYPE
# pwd: /Serving
build_server
$TYPE
build_server
$TYPE
# pwd: /Serving
python_run_test
$TYPE
python_run_test
$TYPE
# pwd: /Serving
echo
"serving
$TYPE
part finished as expected."
echo
"serving
$TYPE
part finished as expected."
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录