Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
38166e29
P
Paddle
项目概览
PaddlePaddle
/
Paddle
11 个月 前同步成功
通知
2292
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
38166e29
编写于
9月 10, 2016
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add default openblas path on MAC OS
上级
a3941cbc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
18 deletion
+20
-18
cmake/cblas.cmake
cmake/cblas.cmake
+6
-4
cmake/util.cmake
cmake/util.cmake
+14
-14
未找到文件。
cmake/cblas.cmake
浏览文件 @
38166e29
...
...
@@ -44,8 +44,8 @@ set(ATLAS_LIB_SEARCH_PATHS
/usr/lib
/usr/lib/blas/atlas
/usr/lib/atlas
/usr/lib/atlas-base
# special for ubuntu 14.04.
)
/usr/lib/atlas-base
)
# special for ubuntu 14.04.
find_path
(
ATLAS_INC_DIR NAMES cblas.h
PATHS
${
ATLAS_INCLUDE_SEARCH_PATHS
}
)
find_library
(
ATLAS_CBLAS_LIB NAMES cblas libcblas.so.3
...
...
@@ -65,12 +65,14 @@ set(OPENBLAS_ROOT $ENV{OPENBLAS_ROOT} CACHE PATH "Folder contains Openblas")
set
(
OPENBLAS_INCLUDE_SEARCH_PATHS
${
OPENBLAS_ROOT
}
/include
/usr/include
/usr/include/openblas
)
/usr/include/openblas
/usr/local/opt/openblas/include
)
set
(
OPENBLAS_LIB_SEARCH_PATHS
${
OPENBLAS_ROOT
}
/lib
/usr/lib
/usr/lib/blas/openblas
/usr/lib/openblas
)
/usr/lib/openblas
/usr/local/opt/openblas/lib
)
find_path
(
OPENBLAS_INC_DIR NAMES cblas.h
PATHS
${
OPENBLAS_INCLUDE_SEARCH_PATHS
}
)
...
...
cmake/util.cmake
浏览文件 @
38166e29
#
Some common routine for paddle compile.
#
MAC OS does not contain start-up and whole-archive args
if
(
APPLE
)
# -------------------------------------------------------
# OSX
# -------------------------------------------------------
set
(
GROUP_START
"-Wl,-force_load"
)
set
(
GROUP_START
""
)
set
(
GROUP_END
""
)
set
(
ARCHIVE_START
"
-Wl,-force_load
"
)
set
(
ARCHIVE_START
""
)
set
(
ARCHIVE_END
""
)
else
()
set
(
GROUP_START
"-Wl,--start-group"
)
...
...
@@ -17,6 +14,7 @@ else()
endif
()
# Some common routine for paddle compile.
# target_circle_link_libraries
# Link libraries to target which has circle dependencies.
...
...
@@ -25,15 +23,16 @@ endif()
# Rest Arguments: libraries which link together.
function
(
target_circle_link_libraries TARGET_NAME
)
if
(
APPLE
)
foreach
(
f
${
ARGN
}
)
list
(
APPEND OSX_LIBRARIES
"-Wl,-force_load"
"
${
f
}
"
)
endforeach
(
f
)
foreach
(
arg
${
ARGN
}
)
list
(
APPEND OSX_LIBRARIES
"-Wl,-force_load"
"
${
arg
}
"
)
endforeach
()
target_link_libraries
(
${
TARGET_NAME
}
${
OSX_LIBRARIES
}
)
${
OSX_LIBRARIES
}
-lz
)
else
()
target_link_libraries
(
${
TARGET_NAME
}
${
GROUP_START
}
${
ARGN
}
-lz
${
GROUP_END
}
)
endif
()
endfunction
()
...
...
@@ -66,18 +65,20 @@ function(link_paddle_exe TARGET_NAME)
if
(
PADDLE_WITH_INTERNAL
)
set
(
INTERAL_LIBS paddle_internal_gserver paddle_internal_parameter
)
target_circle_link_libraries
(
${
TARGET_NAME
}
${
ARCHIVE_START
}
paddle_internal_gserver
paddle_internal_owlqn
${
ARCHIVE_END
}
paddle_internal_parameter
)
else
()
set
(
INTERAL_LIBS
""
)
endif
()
target_circle_link_libraries
(
${
TARGET_NAME
}
#
${ARCHIVE_START}
${
ARCHIVE_START
}
paddle_gserver
${
METRIC_LIBS
}
#
${ARCHIVE_END}
${
ARCHIVE_END
}
paddle_pserver
paddle_trainer_lib
paddle_network
...
...
@@ -91,8 +92,7 @@ function(link_paddle_exe TARGET_NAME)
${
CMAKE_THREAD_LIBS_INIT
}
${
CBLAS_LIBS
}
${
CMAKE_DL_LIBS
}
${
INTERAL_LIBS
}
)
${
INTERAL_LIBS
}
)
if
(
WITH_PYTHON
)
target_link_libraries
(
${
TARGET_NAME
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录