Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
1df2399e
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1df2399e
编写于
1月 07, 2019
作者:
Q
Qiyang Min
提交者:
GitHub
1月 07, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15180 from velconia/add_pyramid_dnn_support
Add JeMalloc
上级
eabb2105
b2716909
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
38 addition
and
4 deletion
+38
-4
CMakeLists.txt
CMakeLists.txt
+8
-1
cmake/FindJeMalloc.cmake
cmake/FindJeMalloc.cmake
+21
-0
cmake/generic.cmake
cmake/generic.cmake
+5
-1
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+4
-2
未找到文件。
CMakeLists.txt
浏览文件 @
1df2399e
...
...
@@ -55,6 +55,7 @@ option(WITH_DOUBLE "Compile PaddlePaddle with double precision" OFF)
option
(
WITH_RDMA
"Compile PaddlePaddle with RDMA support"
OFF
)
option
(
WITH_TIMER
"Compile PaddlePaddle with stats timer"
OFF
)
option
(
WITH_PROFILER
"Compile PaddlePaddle with GPU profiler and gperftools"
OFF
)
option
(
WITH_JEMALLOC
"Compile PaddlePaddle with jemalloc"
OFF
)
option
(
WITH_DOC
"Compile PaddlePaddle with documentation"
OFF
)
option
(
WITH_COVERAGE
"Compile PaddlePaddle with code coverage"
OFF
)
option
(
COVERALLS_UPLOAD
"Package code coverage data to coveralls"
OFF
)
...
...
@@ -261,6 +262,12 @@ if (WITH_PROFILER)
add_definitions
(
-DWITH_GPERFTOOLS
)
endif
()
if
(
WITH_JEMALLOC
)
find_package
(
JeMalloc REQUIRED
)
include_directories
(
${
JEMALLOC_INCLUDE_DIR
}
)
add_definitions
(
-DWITH_JEMALLOC
)
endif
()
include
(
generic
)
# simplify cmake module
include
(
package
)
# set paddle packages
include
(
ccache
)
# set ccache for compilation
...
...
cmake/FindJeMalloc.cmake
0 → 100644
浏览文件 @
1df2399e
# - Find JeMalloc library
# Find the native JeMalloc includes and library
#
# JEMALLOC_INCLUDE_DIR - where to find jemalloc.h, etc.
# JEMALLOC_LIBRARIES - List of libraries when using jemalloc.
# JEMALLOC_FOUND - True if jemalloc found.
find_path
(
JEMALLOC_INCLUDE_DIR
NAMES jemalloc/jemalloc.h
HINTS
${
JEMALLOC_ROOT_DIR
}
/include
)
find_library
(
JEMALLOC_LIBRARIES
NAMES jemalloc
HINTS
${
JEMALLOC_ROOT_DIR
}
/lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
jemalloc DEFAULT_MSG JEMALLOC_LIBRARIES JEMALLOC_INCLUDE_DIR
)
mark_as_advanced
(
JEMALLOC_LIBRARIES
JEMALLOC_INCLUDE_DIR
)
cmake/generic.cmake
浏览文件 @
1df2399e
...
...
@@ -115,6 +115,10 @@ function(common_link TARGET_NAME)
if
(
WITH_PROFILER
)
target_link_libraries
(
${
TARGET_NAME
}
gperftools::profiler
)
endif
()
if
(
WITH_JEMALLOC
)
target_link_libraries
(
${
TARGET_NAME
}
${
JEMALLOC_LIBRARIES
}
)
endif
()
endfunction
()
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
1df2399e
...
...
@@ -199,6 +199,7 @@ function cmake_gen() {
-DANAKIN_BUILD_CROSS_PLANTFORM=
${
ANAKIN_BUILD_CROSS_PLANTFORM
:ON
}
-DPY_VERSION=
${
PY_VERSION
:-
2
.7
}
-DCMAKE_INSTALL_PREFIX=
${
INSTALL_PREFIX
:-
/paddle/build
}
-DWITH_JEMALLOC=
${
WITH_JEMALLOC
:-
OFF
}
========================================
EOF
# Disable UNITTEST_USE_VIRTUALENV in docker because
...
...
@@ -232,7 +233,8 @@ EOF
-DANAKIN_BUILD_FAT_BIN
=
${
ANAKIN_BUILD_FAT_BIN
:OFF
}
\
-DANAKIN_BUILD_CROSS_PLANTFORM
=
${
ANAKIN_BUILD_CROSS_PLANTFORM
:ON
}
\
-DPY_VERSION
=
${
PY_VERSION
:-
2
.7
}
\
-DCMAKE_INSTALL_PREFIX
=
${
INSTALL_PREFIX
:-
/paddle/build
}
-DCMAKE_INSTALL_PREFIX
=
${
INSTALL_PREFIX
:-
/paddle/build
}
\
-DWITH_JEMALLOC
=
${
WITH_JEMALLOC
:-
OFF
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录