Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
55e6e2c4
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
55e6e2c4
编写于
7月 09, 2018
作者:
T
typhoonzero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow commonts
上级
28b7f87c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
7 deletion
+9
-7
python/setup.py.in
python/setup.py.in
+9
-7
未找到文件。
python/setup.py.in
浏览文件 @
55e6e2c4
...
@@ -126,13 +126,15 @@ if '${WITH_MKL}' == 'ON':
...
@@ -126,13 +126,15 @@ if '${WITH_MKL}' == 'ON':
shutil.copy('${MKLML_IOMP_LIB}', libs_path)
shutil.copy('${MKLML_IOMP_LIB}', libs_path)
package_data['paddle.libs']+=['libmklml_intel.so','libiomp5.so']
package_data['paddle.libs']+=['libmklml_intel.so','libiomp5.so']
if '${WITH_MKLDNN}' == 'ON':
if '${WITH_MKLDNN}' == 'ON':
if "@APPLE@" != "1":
# TODO(typhoonzero): use install_name_tool to patch mkl libs once
# change rpath of libmkldnn.so.0, add $ORIGIN/ to it.
# we can support mkl on mac.
# The reason is that all thirdparty libraries in the same directory,
#
# thus, libmkldnn.so.0 will find libmklml_intel.so and libiomp5.so.
# change rpath of libmkldnn.so.0, add $ORIGIN/ to it.
command = "patchelf --set-rpath '$ORIGIN/' ${MKLDNN_SHARED_LIB}"
# The reason is that all thirdparty libraries in the same directory,
# thus, libmkldnn.so.0 will find libmklml_intel.so and libiomp5.so.
command = "patchelf --set-rpath '$ORIGIN/' ${MKLDNN_SHARED_LIB}"
if os.system(command) != 0:
if os.system(command) != 0:
raise Exception("patch
elf --set-rpath for libmkldnn.so.0 fails"
)
raise Exception("patch
libmkldnn.so failed, command: %s" % command
)
package_data['paddle.libs']+=['libmkldnn.so.0']
package_data['paddle.libs']+=['libmkldnn.so.0']
shutil.copy('${MKLDNN_SHARED_LIB}', libs_path)
shutil.copy('${MKLDNN_SHARED_LIB}', libs_path)
# remove unused paddle/libs/__init__.py
# remove unused paddle/libs/__init__.py
...
@@ -148,7 +150,7 @@ if "@APPLE@" == "1":
...
@@ -148,7 +150,7 @@ if "@APPLE@" == "1":
else:
else:
command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/core.so"
command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/core.so"
if os.system(command) != 0:
if os.system(command) != 0:
raise Exception("patch
elf --set-rpath for core.so fails"
)
raise Exception("patch
core.so failed, command: %s" % command
)
setup(name='${PACKAGE_NAME}',
setup(name='${PACKAGE_NAME}',
version='${PADDLE_VERSION}',
version='${PADDLE_VERSION}',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录