Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
夏有凉风,冬有雪
Paddle
提交
d44f5e93
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d44f5e93
编写于
1月 10, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Resolving circular dependences in linux
上级
a355493e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
27 deletion
+30
-27
CMakeLists.txt
CMakeLists.txt
+1
-1
cmake/coveralls.cmake
cmake/coveralls.cmake
+1
-1
paddle/api/CMakeLists.txt
paddle/api/CMakeLists.txt
+24
-17
paddle/api/test/run_tests.sh
paddle/api/test/run_tests.sh
+2
-6
paddle/scripts/travis/build_and_test.sh
paddle/scripts/travis/build_and_test.sh
+2
-2
未找到文件。
CMakeLists.txt
浏览文件 @
d44f5e93
...
...
@@ -40,7 +40,7 @@ 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"
OFF
)
option
(
WITH_DOC
"Compile PaddlePaddle with documentation"
OFF
)
option
(
ON_COVERALLS
"Compile PaddlePaddle with code coverage"
OFF
)
option
(
WITH_COVERAGE
"Compile PaddlePaddle with code coverage"
OFF
)
option
(
COVERALLS_UPLOAD
"Package code coverage data to coveralls"
OFF
)
option
(
ON_TRAVIS
"Exclude special unit test on Travis CI"
OFF
)
########################################################################################
...
...
cmake/coveralls.cmake
浏览文件 @
d44f5e93
...
...
@@ -61,7 +61,7 @@ function(code_coverage _COVERAGE_SRCS _COVERALLS_UPLOAD _CMAKE_SCRIPT_PATH)
endif
()
endfunction
()
if
(
ON_COVERALLS
)
if
(
WITH_COVERAGE
)
set
(
CMAKE_BUILD_TYPE
"Debug"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-g -O0 -fprofile-arcs -ftest-coverage"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-g -O0 -fprofile-arcs -ftest-coverage"
)
...
...
paddle/api/CMakeLists.txt
浏览文件 @
d44f5e93
...
...
@@ -26,7 +26,11 @@ FILE(GLOB PY_PADDLE_PYTHON_FILES ${PROJ_ROOT}/paddle/py_paddle/*.py)
SET_SOURCE_FILES_PROPERTIES
(
Paddle.i PROPERTIES CPLUSPLUS ON
)
SET
(
CMAKE_SWIG_OUTDIR
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
CMAKE_CXX_FLAGS
"-std=c++11 -fPIC"
)
SET
(
CMAKE_CXX_FLAGS
"-std=c++11 -fPIC -Wall"
)
IF
(
WITH_COVERAGE
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-g -O0 -fprofile-arcs -ftest-coverage"
)
ENDIF
(
WITH_COVERAGE
)
SET
(
SWIG_MODULE_swig_paddle_EXTRA_DEPS
paddle_parameter
paddle_function
...
...
@@ -44,34 +48,37 @@ SET(SWIG_MODULE_swig_paddle_EXTRA_DEPS
)
IF
(
APPLE
)
SET
(
CMAKE_LINK_FLAGS
"-undefined dynamic_lookup -Wl,-all_load"
)
SET
(
ARCHIVE_START
"-undefined dynamic_lookup -Wl,-all_load"
)
ELSE
(
APPLE
)
SET
(
START_GROUP
"-Xlinker -start-group"
)
SET
(
END_GROUP
"-Xlinker -end-group"
)
SET
(
ARCHIVE_START
"-Wl,--whole-archive"
)
SET
(
ARCHIVE_END
"-Wl,--no-whole-archive"
)
ENDIF
(
APPLE
)
SWIG_ADD_MODULE
(
swig_paddle python Paddle.i
)
SWIG_LINK_LIBRARIES
(
swig_paddle
${
CMAKE_LINK_FLAGS
}
${
CMAKE_DL_LIBS
}
${
EXTERNAL_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
paddle_parameter
paddle_math
paddle_utils
paddle_pserver
paddle_api
paddle_cuda
paddle_trainer_lib
paddle_network
paddle_proto
${
START_GROUP
}
${
ARCHIVE_START
}
paddle_gserver
paddle_function
${
METRIC_LIBS
}
${
ARCHIVE_END
}
paddle_pserver
paddle_trainer_lib
paddle_network
paddle_parameter
paddle_math
paddle_utils
paddle_proto
paddle_cuda
paddle_api
${
CMAKE_DL_LIBS
}
${
EXTERNAL_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
${
START_END
}
)
add_custom_command
(
OUTPUT
${
PROJ_ROOT
}
/paddle/dist/.timestamp
...
...
paddle/api/test/run_tests.sh
浏览文件 @
d44f5e93
...
...
@@ -20,11 +20,7 @@ popd > /dev/null
cd
$SCRIPTPATH
rm
-rf
.test_env
virtualenv .test_env
source
.test_env/bin/activate
python
-m
pip
install
../../dist/
*
.whl
$1
-m
pip
install
../../dist/
*
.whl
test_list
=
"testArguments.py testGradientMachine.py testMatrix.py testVector.py testTrain.py testTrainer.py"
...
...
@@ -33,7 +29,7 @@ export PYTHONPATH=$PWD/../../../python/
for
fn
in
$test_list
do
echo
"test
$fn
"
python
$fn
$1
$fn
if
[
$?
-ne
0
]
;
then
exit
1
fi
...
...
paddle/scripts/travis/build_and_test.sh
浏览文件 @
d44f5e93
...
...
@@ -6,14 +6,14 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export
PYTHONPATH
=
/opt/python/2.7.12/lib/python2.7/site-packages
export
PYTHONHOME
=
/opt/python/2.7.12
export
PATH
=
/opt/python/2.7.12/bin:
${
PATH
}
cmake ..
-DON_TRAVIS
=
ON
-D
ON_COVERALLS
=
ON
-DCOVERALLS_UPLOAD
=
ON
cmake ..
-DON_TRAVIS
=
ON
-D
WITH_COVERAGE
=
ON
-DCOVERALLS_UPLOAD
=
ON
NRPOC
=
`
nproc
`
make
-j
$NPROC
make coveralls
sudo
make
install
elif
[[
"
$TRAVIS_OS_NAME
"
==
"osx"
]]
;
then
export
PYTHONPATH
=
/usr/local/lib/python2.7/site-packages
cmake ..
-DON_TRAVIS
=
ON
-DON_COVERALLS
=
ON
-DCOVERALLS_UPLOAD
=
ON
cmake ..
-DON_TRAVIS
=
ON
NPROC
=
`
sysctl
-n
hw.ncpu
`
make
-j
$NPROC
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录