Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wmsofts
Paddle
提交
bd1f6a79
P
Paddle
项目概览
wmsofts
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bd1f6a79
编写于
1月 09, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix swig on linux and clean cmake
上级
8c3a9e6b
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
22 addition
and
30 deletion
+22
-30
CMakeLists.txt
CMakeLists.txt
+8
-1
cmake/external/python.cmake
cmake/external/python.cmake
+0
-4
cmake/util.cmake
cmake/util.cmake
+0
-20
paddle/api/CMakeLists.txt
paddle/api/CMakeLists.txt
+8
-3
paddle/api/test/run_tests.sh
paddle/api/test/run_tests.sh
+6
-2
未找到文件。
CMakeLists.txt
浏览文件 @
bd1f6a79
...
...
@@ -72,14 +72,21 @@ include_directories("${PROJ_ROOT}/paddle/cuda/include")
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/proto"
)
set
(
EXTERNAL_LIBS
# have not include gtest here.
${
GFLAGS_LIBRARIES
}
${
GLOG_LIBRARIES
}
${
CBLAS_LIBRARIES
}
${
PROTOBUF_LIBRARY
}
${
ZLIB_LIBRARIES
}
${
PYTHON_LIBRARIES
}
)
if
(
WITH_GPU
)
list
(
APPEND EXTERNAL_LIB
${
CUDA_LIBRARIES
}
${
CUDA_rt_LIBRARY
}
)
if
(
NOT WITH_DSO
)
list
(
APPEND EXTERNAL_LIB
${
CUDNN_LIBRARY
}
${
CUDA_CUBLAS_LIBRARIES
}
${
CUDA_curand_LIBRARY
}
)
endif
(
NOT WITH_DSO
)
endif
(
WITH_GPU
)
add_subdirectory
(
proto
)
add_subdirectory
(
paddle
)
add_subdirectory
(
python
)
...
...
cmake/external/python.cmake
浏览文件 @
bd1f6a79
...
...
@@ -216,7 +216,3 @@ ENDIF(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND)
INCLUDE_DIRECTORIES
(
${
PYTHON_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
PYTHON_NUMPY_INCLUDE_DIR
}
)
MESSAGE
(
"[Paddle] Python Executable:
${
PYTHON_EXECUTABLE
}
"
)
MESSAGE
(
"[Paddle] Python Include:
${
PYTHON_INCLUDE_DIRS
}
"
)
MESSAGE
(
"[Paddle] Python Libraries:
${
PYTHON_LIBRARIES
}
"
)
cmake/util.cmake
浏览文件 @
bd1f6a79
...
...
@@ -95,32 +95,12 @@ function(link_paddle_exe TARGET_NAME)
paddle_parameter
paddle_proto
paddle_cuda
${
METRIC_LIBS
}
${
EXTERNAL_LIBS
}
${
CMAKE_THREAD_LIBS_INIT
}
${
CMAKE_DL_LIBS
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
)
if
(
WITH_PYTHON
)
target_link_libraries
(
${
TARGET_NAME
}
${
PYTHON_LIBRARIES
}
util
)
endif
()
if
(
WITH_GPU
)
if
(
NOT WITH_DSO OR WITH_METRIC
)
target_link_libraries
(
${
TARGET_NAME
}
${
CUDNN_LIBRARY
}
${
CUDA_curand_LIBRARY
}
)
CUDA_ADD_CUBLAS_TO_TARGET
(
${
TARGET_NAME
}
)
endif
()
check_library_exists
(
rt clock_gettime
"time.h"
HAVE_CLOCK_GETTIME
)
if
(
HAVE_CLOCK_GETTIME
)
target_link_libraries
(
${
TARGET_NAME
}
rt
)
endif
()
endif
()
add_dependencies
(
${
TARGET_NAME
}
${
external_project_dependencies
}
)
endfunction
()
...
...
paddle/api/CMakeLists.txt
浏览文件 @
bd1f6a79
...
...
@@ -45,6 +45,9 @@ SET(SWIG_MODULE_swig_paddle_EXTRA_DEPS
IF
(
APPLE
)
SET
(
CMAKE_LINK_FLAGS
"-undefined dynamic_lookup -Wl,-all_load"
)
ELSE
(
APPLE
)
SET
(
ARCHIVE_START
"-Wl,--whole-archive"
)
SET
(
ARCHIVE_END
"-Wl,--no-whole-archive"
)
ENDIF
(
APPLE
)
SWIG_ADD_MODULE
(
swig_paddle python Paddle.i
)
...
...
@@ -52,21 +55,23 @@ SWIG_LINK_LIBRARIES(swig_paddle
${
CMAKE_LINK_FLAGS
}
${
CMAKE_DL_LIBS
}
${
EXTERNAL_LIBS
}
${
PYTHON_LIBRARIES
}
${
CMAKE_THREAD_LIBS_INIT
}
${
RDMA_LD_FLAGS
}
${
RDMA_LIBS
}
paddle_parameter
paddle_function
paddle_math
paddle_utils
paddle_gserver
paddle_pserver
paddle_api
paddle_cuda
paddle_trainer_lib
paddle_network
paddle_proto
ARCHIVE_START
paddle_gserver
paddle_function
${
METRIC_LIBS
}
ARCHIVE_END
)
add_custom_command
(
OUTPUT
${
PROJ_ROOT
}
/paddle/dist/.timestamp
...
...
paddle/api/test/run_tests.sh
浏览文件 @
bd1f6a79
...
...
@@ -20,7 +20,11 @@ popd > /dev/null
cd
$SCRIPTPATH
$1
-m
pip
install
../../dist/
*
.whl
rm
-rf
.test_env
virtualenv .test_env
source
.test_env/bin/activate
python
-m
pip
install
../../dist/
*
.whl
test_list
=
"testArguments.py testGradientMachine.py testMatrix.py testVector.py testTrain.py testTrainer.py"
...
...
@@ -29,7 +33,7 @@ export PYTHONPATH=$PWD/../../../python/
for
fn
in
$test_list
do
echo
"test
$fn
"
$1
$fn
python
$fn
if
[
$?
-ne
0
]
;
then
exit
1
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录