Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
fdec0c27
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
fdec0c27
编写于
9月 17, 2019
作者:
W
Wang Guibao
提交者:
GitHub
9月 17, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #73 from wangguibao/fix_mklml_lib
Fix mklml lib
上级
2bb45458
f4b244ff
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
81 deletion
+8
-81
CMakeLists.txt
CMakeLists.txt
+0
-1
cmake/external/mklml.cmake
cmake/external/mklml.cmake
+0
-76
demo-serving/CMakeLists.txt
demo-serving/CMakeLists.txt
+8
-4
未找到文件。
CMakeLists.txt
浏览文件 @
fdec0c27
...
...
@@ -75,7 +75,6 @@ include(generic)
include
(
flags
)
if
(
NOT CLIENT_ONLY
)
include
(
external/mklml
)
include
(
paddlepaddle
)
include
(
external/opencv
)
endif
()
...
...
cmake/external/mklml.cmake
已删除
100644 → 0
浏览文件 @
2bb45458
# Copyright (c) 2017 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
IF
(
NOT
${
WITH_MKLML
}
)
return
()
ENDIF
(
NOT
${
WITH_MKLML
}
)
IF
(
APPLE
)
MESSAGE
(
WARNING
"Mac is not supported with MKLML in Paddle yet. Force WITH_MKLML=OFF."
)
SET
(
WITH_MKLML OFF CACHE STRING
"Disable MKLML package in MacOS"
FORCE
)
return
()
ENDIF
()
INCLUDE
(
ExternalProject
)
SET
(
MKLML_DST_DIR
"mklml"
)
SET
(
MKLML_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
SET
(
MKLML_INSTALL_DIR
${
MKLML_INSTALL_ROOT
}
/
${
MKLML_DST_DIR
}
)
SET
(
MKLML_ROOT
${
MKLML_INSTALL_DIR
}
)
SET
(
MKLML_INC_DIR
${
MKLML_ROOT
}
/include
)
SET
(
MKLML_LIB_DIR
${
MKLML_ROOT
}
/lib
)
SET
(
CMAKE_INSTALL_RPATH
"
${
CMAKE_INSTALL_RPATH
}
"
"
${
MKLML_ROOT
}
/lib"
)
SET
(
TIME_VERSION
"2019.0.1.20181227"
)
IF
(
WIN32
)
SET
(
MKLML_VER
"mklml_win_
${
TIME_VERSION
}
"
CACHE STRING
""
FORCE
)
SET
(
MKLML_URL
"https://paddlepaddledeps.cdn.bcebos.com/
${
MKLML_VER
}
.zip"
CACHE STRING
""
FORCE
)
SET
(
MKLML_LIB
${
MKLML_LIB_DIR
}
/mklml.lib
)
SET
(
MKLML_IOMP_LIB
${
MKLML_LIB_DIR
}
/libiomp5md.lib
)
SET
(
MKLML_SHARED_LIB
${
MKLML_LIB_DIR
}
/mklml.dll
)
SET
(
MKLML_SHARED_IOMP_LIB
${
MKLML_LIB_DIR
}
/libiomp5md.dll
)
ELSE
()
SET
(
MKLML_VER
"mklml_lnx_
${
TIME_VERSION
}
"
CACHE STRING
""
FORCE
)
SET
(
MKLML_URL
"http://paddlepaddledeps.cdn.bcebos.com/
${
MKLML_VER
}
.tgz"
CACHE STRING
""
FORCE
)
SET
(
MKLML_LIB
${
MKLML_LIB_DIR
}
/libmklml_intel.so
)
SET
(
MKLML_IOMP_LIB
${
MKLML_LIB_DIR
}
/libiomp5.so
)
SET
(
MKLML_SHARED_LIB
${
MKLML_LIB_DIR
}
/libmklml_intel.so
)
SET
(
MKLML_SHARED_IOMP_LIB
${
MKLML_LIB_DIR
}
/libiomp5.so
)
ENDIF
()
SET
(
MKLML_PROJECT
"extern_mklml"
)
MESSAGE
(
STATUS
"MKLML_VER:
${
MKLML_VER
}
, MKLML_URL:
${
MKLML_URL
}
"
)
SET
(
MKLML_SOURCE_DIR
"
${
THIRD_PARTY_PATH
}
/mklml"
)
SET
(
MKLML_DOWNLOAD_DIR
"
${
MKLML_SOURCE_DIR
}
/src/
${
MKLML_PROJECT
}
"
)
ExternalProject_Add
(
${
MKLML_PROJECT
}
${
EXTERNAL_PROJECT_LOG_ARGS
}
PREFIX
${
MKLML_SOURCE_DIR
}
URL
${
MKLML_URL
}
DOWNLOAD_DIR
${
MKLML_DOWNLOAD_DIR
}
DOWNLOAD_NO_PROGRESS 1
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
UPDATE_COMMAND
""
INSTALL_COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
MKLML_DOWNLOAD_DIR
}
/include
${
MKLML_INC_DIR
}
&&
${
CMAKE_COMMAND
}
-E copy_directory
${
MKLML_DOWNLOAD_DIR
}
/lib
${
MKLML_LIB_DIR
}
)
INCLUDE_DIRECTORIES
(
${
MKLML_INC_DIR
}
)
ADD_LIBRARY
(
mklml SHARED IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET mklml PROPERTY IMPORTED_LOCATION
${
MKLML_LIB
}
)
ADD_DEPENDENCIES
(
mklml
${
MKLML_PROJECT
}
)
LIST
(
APPEND external_project_dependencies mklml
)
demo-serving/CMakeLists.txt
浏览文件 @
fdec0c27
...
...
@@ -25,7 +25,12 @@ if (NOT EXISTS
endif
()
include_directories
(
SYSTEM
${
CMAKE_CURRENT_LIST_DIR
}
/../kvdb/include
)
find_library
(
MKLML_LIBS NAMES libmklml_intel.so libiomp5.so
)
find_library
(
MKLML_LIB NAMES libmklml_intel.so PATHS
${
CMAKE_BINARY_DIR
}
/Paddle/third_party/install/mklml/lib/
)
find_library
(
MKLML_IOMP_LIB NAMES libiomp5.so PATHS
${
CMAKE_BINARY_DIR
}
/Paddle/third_party/install/mklml/lib
)
include
(
op/CMakeLists.txt
)
include
(
proto/CMakeLists.txt
)
add_executable
(
serving
${
serving_srcs
}
)
...
...
@@ -75,8 +80,7 @@ install(FILES ${inc}
DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/include/serving
)
if
(
${
WITH_MKL
}
)
install
(
FILES
${
THIRD_PARTY_PATH
}
/install/mklml/lib/libmklml_intel.so
${
THIRD_PARTY_PATH
}
/install/mklml/lib/libmklml_gnu.so
${
THIRD_PARTY_PATH
}
/install/mklml/lib/libiomp5.so DESTINATION
install
(
FILES
${
CMAKE_BINARY_DIR
}
/Paddle/third_party/install/mklml/lib/libmklml_intel.so
${
CMAKE_BINARY_DIR
}
/Paddle/third_party/install/mklml/lib/libiomp5.so DESTINATION
${
PADDLE_SERVING_INSTALL_DIR
}
/demo/serving/bin
)
endif
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录