Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
4706552c
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看板
未验证
提交
4706552c
编写于
2月 28, 2020
作者:
D
Dong Daxiang
提交者:
GitHub
2月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #212 from MRXLT/general-server
bug fix
上级
f2f8ac82
3560ee4f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
11 deletion
+18
-11
CMakeLists.txt
CMakeLists.txt
+1
-0
core/util/src/timer.cc
core/util/src/timer.cc
+2
-2
python/paddle_serving_server/__init__.py
python/paddle_serving_server/__init__.py
+6
-4
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+7
-3
python/setup.py.client.in
python/setup.py.client.in
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
4706552c
...
...
@@ -51,6 +51,7 @@ option(WITH_MKL "Compile Paddle Serving with MKL support." OFF)
option
(
WITH_GPU
"Compile Paddle Serving with NVIDIA GPU"
OFF
)
option
(
CLIENT_ONLY
"Compile client libraries and demos only"
OFF
)
option
(
WITH_ELASTIC_CTR
"Compile ELASITC-CTR solution"
OFF
)
option
(
PACK
"Compile for whl"
OFF
)
set
(
WITH_MKLML
${
WITH_MKL
}
)
if
(
NOT DEFINED WITH_MKLDNN
)
...
...
core/util/src/timer.cc
浏览文件 @
4706552c
...
...
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <sys/time.h>
#include "core/util/include/timer.h"
#include <sys/time.h>
namespace
baidu
{
namespace
paddle_serving
{
...
...
@@ -56,7 +56,7 @@ double Timer::ElapsedSec() { return _elapsed / 1000000.0; }
int64_t
Timer
::
TimeStampUS
()
{
gettimeofday
(
&
_now
,
NULL
);
return
_now
.
tv_usec
;
return
_now
.
tv_
sec
*
1000
*
1000L
+
_now
.
tv_
usec
;
}
int64_t
Timer
::
Tickus
()
{
...
...
python/paddle_serving_server/__init__.py
浏览文件 @
4706552c
...
...
@@ -109,9 +109,10 @@ class Server(object):
def
set_memory_optimize
(
self
,
flag
=
False
):
self
.
memory_optimization
=
flag
def
set_local_bin
(
self
,
path
):
self
.
use_local_bin
=
True
self
.
bin_path
=
path
def
check_local_bin
(
self
):
if
"SERVING_BIN"
in
os
.
environ
:
self
.
use_local_bin
=
True
self
.
bin_path
=
os
.
environ
[
"SERVING_BIN"
]
def
_prepare_engine
(
self
,
model_config_path
,
device
):
if
self
.
model_toolkit_conf
==
None
:
...
...
@@ -258,10 +259,11 @@ class Server(object):
def
run_server
(
self
):
# just run server with system command
# currently we do not load cube
self
.
check_local_bin
()
if
not
self
.
use_local_bin
:
self
.
download_bin
()
else
:
print
(
"Use local bin
"
)
print
(
"Use local bin
: {}"
.
format
(
self
.
bin_path
)
)
command
=
"{} "
\
"-enable_model_toolkit "
\
"-inferservice_path {} "
\
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
4706552c
...
...
@@ -109,9 +109,10 @@ class Server(object):
def
set_memory_optimize
(
self
,
flag
=
False
):
self
.
memory_optimization
=
flag
def
set_local_bin
(
self
,
path
):
self
.
use_local_bin
=
True
self
.
bin_path
=
path
def
check_local_bin
(
self
):
if
"SERVING_BIN"
in
os
.
environ
:
self
.
use_local_bin
=
True
self
.
bin_path
=
os
.
environ
[
"SERVING_BIN"
]
def
set_gpuid
(
self
,
gpuid
=
0
):
self
.
gpuid
=
gpuid
...
...
@@ -243,8 +244,11 @@ class Server(object):
def
run_server
(
self
):
# just run server with system command
# currently we do not load cube
self
.
check_local_bin
()
if
not
self
.
use_local_bin
:
self
.
download_bin
()
else
:
print
(
"Use local bin : {}"
.
format
(
self
.
bin_path
))
command
=
"{} "
\
"-enable_model_toolkit "
\
"-inferservice_path {} "
\
...
...
python/setup.py.client.in
浏览文件 @
4706552c
...
...
@@ -35,7 +35,8 @@ def copy_lib():
os.popen('cp {} ./paddle_serving_client/lib'.format(text.strip().split(' ')[1]))
max_version, mid_version, min_version = python_version()
copy_lib()
if '${PACK}' == 'ON':
copy_lib()
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0','paddlepaddle'
...
...
@@ -91,4 +92,3 @@ setup(
],
license='Apache 2.0',
keywords=('paddle-serving serving-client deployment industrial easy-to-use'))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录