Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
7a56d46a
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
提交
7a56d46a
编写于
8月 10, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename PROJ_ROOT to PADDLE_SOURCE_DIR and PROJ_BINARY_ROOT to PADDLE_BINARY_DIR
上级
7c8e5c3b
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
89 addition
and
89 deletion
+89
-89
CMakeLists.txt
CMakeLists.txt
+4
-4
cmake/configure.cmake
cmake/configure.cmake
+1
-1
cmake/cpplint.cmake
cmake/cpplint.cmake
+1
-1
cmake/package.cmake
cmake/package.cmake
+1
-1
cmake/util.cmake
cmake/util.cmake
+2
-2
cmake/version.cmake
cmake/version.cmake
+1
-1
doc/templates/conf.py.cn.in
doc/templates/conf.py.cn.in
+3
-3
doc/templates/conf.py.en.in
doc/templates/conf.py.en.in
+3
-3
paddle/api/CMakeLists.txt
paddle/api/CMakeLists.txt
+7
-7
paddle/capi/tests/CMakeLists.txt
paddle/capi/tests/CMakeLists.txt
+2
-2
paddle/gserver/tests/CMakeLists.txt
paddle/gserver/tests/CMakeLists.txt
+12
-12
paddle/math/CMakeLists.txt
paddle/math/CMakeLists.txt
+4
-4
paddle/pserver/test/CMakeLists.txt
paddle/pserver/test/CMakeLists.txt
+3
-3
paddle/trainer/tests/CMakeLists.txt
paddle/trainer/tests/CMakeLists.txt
+24
-24
paddle/utils/tests/CMakeLists.txt
paddle/utils/tests/CMakeLists.txt
+1
-1
proto/CMakeLists.txt
proto/CMakeLists.txt
+2
-2
python/CMakeLists.txt
python/CMakeLists.txt
+4
-4
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
+7
-7
python/setup.py.in
python/setup.py.in
+7
-7
未找到文件。
CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -14,8 +14,8 @@
cmake_minimum_required
(
VERSION 3.0
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
set
(
P
ROJ_ROOT
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
P
ROJ_BINARY_ROOT
${
CMAKE_CURRENT_BINARY_DIR
}
)
set
(
P
ADDLE_SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
P
ADDLE_BINARY_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
)
include
(
system
)
...
...
@@ -121,8 +121,8 @@ include(version) # set PADDLE_VERSION
include
(
coveralls
)
# set code coverage
include_directories
(
"
${
P
ROJ_ROOT
}
"
)
include_directories
(
"
${
P
ROJ_ROOT
}
/paddle/cuda/include"
)
include_directories
(
"
${
P
ADDLE_SOURCE_DIR
}
"
)
include_directories
(
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/cuda/include"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/proto"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/go/pserver/client/c"
)
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
...
...
cmake/configure.cmake
浏览文件 @
7a56d46a
...
...
@@ -129,7 +129,7 @@ if(WITH_GOLANG)
add_custom_command
(
OUTPUT
${
CMAKE_BINARY_DIR
}
/glide
COMMAND env GOPATH=
${
GOPATH
}
${
GLIDE
}
install
COMMAND touch
${
CMAKE_BINARY_DIR
}
/glide
DEPENDS
${
P
ROJ_ROOT
}
/go/glide.lock
DEPENDS
${
P
ADDLE_SOURCE_DIR
}
/go/glide.lock
WORKING_DIRECTORY
"
${
PADDLE_IN_GOPATH
}
/go"
)
...
...
cmake/cpplint.cmake
浏览文件 @
7a56d46a
...
...
@@ -52,7 +52,7 @@ macro(add_style_check_target TARGET_NAME)
if
(
SOURCES_LIST
)
add_custom_command
(
TARGET
${
TARGET_NAME
}
POST_BUILD
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
P
ROJ_ROOT
}
/paddle/scripts/cpplint.py"
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/scripts/cpplint.py"
"--filter=
${
STYLE_FILTER
}
"
${
SOURCES_LIST
}
COMMENT
"cpplint: Checking source code style"
...
...
cmake/package.cmake
浏览文件 @
7a56d46a
...
...
@@ -12,7 +12,7 @@ set(CPACK_PACKAGE_DESCRIPTION "")
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"libpython2.7-dev, libstdc++6, python-pip, curl, libgfortran3, python-pip-whl"
)
set
(
CPACK_DEBIAN_PACKAGE_SECTION Devel
)
set
(
CPACK_DEBIAN_PACKAGE_VERSION
${
PADDLE_VERSION
}
)
set
(
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"
${
P
ROJ_ROOT
}
/paddle/scripts/deb/postinst"
)
set
(
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/scripts/deb/postinst"
)
#set(CPACK_GENERATOR "DEB")
# Start cpack
include
(
CMakePackageConfigHelpers
)
...
...
cmake/util.cmake
浏览文件 @
7a56d46a
...
...
@@ -141,8 +141,8 @@ endmacro()
function
(
create_resources res_file output_file
)
add_custom_command
(
OUTPUT
${
output_file
}
COMMAND python ARGS
${
P
ROJ_ROOT
}
/cmake/make_resource.py
${
res_file
}
${
output_file
}
DEPENDS
${
res_file
}
${
P
ROJ_ROOT
}
/cmake/make_resource.py
)
COMMAND python ARGS
${
P
ADDLE_SOURCE_DIR
}
/cmake/make_resource.py
${
res_file
}
${
output_file
}
DEPENDS
${
res_file
}
${
P
ADDLE_SOURCE_DIR
}
/cmake/make_resource.py
)
endfunction
()
...
...
cmake/version.cmake
浏览文件 @
7a56d46a
...
...
@@ -4,7 +4,7 @@ set(tmp_version "HEAD")
while
(
"
${
PADDLE_VERSION
}
"
STREQUAL
""
)
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
describe --tags --abbrev=0
${
tmp_version
}
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_TAG_NAME
RESULT_VARIABLE GIT_RESULT
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
)
...
...
doc/templates/conf.py.cn.in
浏览文件 @
7a56d46a
...
...
@@ -13,7 +13,7 @@
# serve to show the default.
import sys
import os, subprocess
sys.path.insert(0, os.path.abspath('@P
ROJ_ROOT
@/python'))
sys.path.insert(0, os.path.abspath('@P
ADDLE_SOURCE_DIR
@/python'))
import shlex
from recommonmark import parser, transform
import paddle
...
...
@@ -24,7 +24,7 @@ AutoStructify = transform.AutoStructify
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
templates_path = ["@P
ROJ_ROOT
@/doc_theme/templates"]
templates_path = ["@P
ADDLE_SOURCE_DIR
@/doc_theme/templates"]
# -- General configuration ------------------------------------------------
...
...
@@ -120,7 +120,7 @@ html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['@P
ROJ_ROOT
@/doc_theme/static']
html_static_path = ['@P
ADDLE_SOURCE_DIR
@/doc_theme/static']
# Output file base name for HTML help builder.
htmlhelp_basename = project + 'doc'
...
...
doc/templates/conf.py.en.in
浏览文件 @
7a56d46a
...
...
@@ -13,7 +13,7 @@
# serve to show the default.
import sys
import os, subprocess
sys.path.insert(0, os.path.abspath('@P
ROJ_ROOT
@/python'))
sys.path.insert(0, os.path.abspath('@P
ADDLE_SOURCE_DIR
@/python'))
import shlex
from recommonmark import parser, transform
import paddle
...
...
@@ -25,7 +25,7 @@ AutoStructify = transform.AutoStructify
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
templates_path = ["@P
ROJ_ROOT
@/doc_theme/templates"]
templates_path = ["@P
ADDLE_SOURCE_DIR
@/doc_theme/templates"]
# -- General configuration ------------------------------------------------
...
...
@@ -120,7 +120,7 @@ html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['@P
ROJ_ROOT
@/doc_theme/static']
html_static_path = ['@P
ADDLE_SOURCE_DIR
@/doc_theme/static']
# Output file base name for HTML help builder.
htmlhelp_basename = project + 'doc'
...
...
paddle/api/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -19,9 +19,9 @@ add_library(paddle_api STATIC ${API_SOURCES})
add_dependencies
(
paddle_api paddle_proto paddle_trainer_lib
)
INCLUDE
(
${
SWIG_USE_FILE
}
)
INCLUDE_DIRECTORIES
(
${
P
ROJ_ROOT
}
/paddle
)
INCLUDE_DIRECTORIES
(
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
FILE
(
GLOB PY_PADDLE_PYTHON_FILES
${
P
ROJ_ROOT
}
/paddle/py_paddle/*.py
)
FILE
(
GLOB PY_PADDLE_PYTHON_FILES
${
P
ADDLE_SOURCE_DIR
}
/paddle/py_paddle/*.py
)
SET_SOURCE_FILES_PROPERTIES
(
Paddle.i PROPERTIES CPLUSPLUS ON
)
...
...
@@ -79,16 +79,16 @@ SWIG_LINK_LIBRARIES(swig_paddle
${
START_END
}
)
add_custom_command
(
OUTPUT
${
P
ROJ_ROOT
}
/paddle/py_paddle/_swig_paddle.so
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/swig_paddle.py
${
P
ROJ_ROOT
}
/paddle/py_paddle
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/_swig_paddle.so
${
P
ROJ_ROOT
}
/paddle/py_paddle
add_custom_command
(
OUTPUT
${
P
ADDLE_SOURCE_DIR
}
/paddle/py_paddle/_swig_paddle.so
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/swig_paddle.py
${
P
ADDLE_SOURCE_DIR
}
/paddle/py_paddle
COMMAND cp
${
CMAKE_CURRENT_BINARY_DIR
}
/_swig_paddle.so
${
P
ADDLE_SOURCE_DIR
}
/paddle/py_paddle
COMMAND
${
CMAKE_COMMAND
}
-E touch .timestamp
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
DEPENDS _swig_paddle
)
# TODO(yuyang18) : make wheel name calculated by cmake
add_custom_target
(
python_api_wheel ALL DEPENDS
${
P
ROJ_ROOT
}
/paddle/py_paddle/_swig_paddle.so
)
add_custom_target
(
python_api_wheel ALL DEPENDS
${
P
ADDLE_SOURCE_DIR
}
/paddle/py_paddle/_swig_paddle.so
)
if
(
WITH_TESTING
)
IF
(
NOT PY_PIP_FOUND
)
...
...
paddle/capi/tests/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -10,5 +10,5 @@ target_include_directories(capi_test_gradientMachine PUBLIC
${
PADDLE_CAPI_INC_PATH
}
)
target_link_libraries
(
capi_test_gradientMachine paddle_capi
)
add_test
(
NAME capi_test_gradientMachine
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/capi_test_gradientMachine
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/capi/tests
)
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/capi_test_gradientMachine
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/capi/tests
)
paddle/gserver/tests/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -9,7 +9,7 @@ add_unittest_without_exec(test_ProtoDataProvider
# mkdir will get error.
add_test
(
NAME test_ProtoDataProvider
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_ProtoDataProvider
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
################# test_LayerGrad #######################
add_unittest_without_exec
(
test_LayerGrad
...
...
@@ -92,8 +92,8 @@ if(WITH_PYTHON)
test_PyDataProvider.cpp
)
add_test
(
NAME test_PyDataProvider
COMMAND .set_python_path.sh -d ./gserver/tests:
${
P
ROJ_ROOT
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
COMMAND .set_python_path.sh -d ./gserver/tests:
${
P
ADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
endif
()
############### test_RecurrentLayer #######################
...
...
@@ -106,7 +106,7 @@ if(NOT WITH_DOUBLE)
add_test
(
NAME test_WarpCTCLayer
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_WarpCTCLayer --warpctc_dir=
${
WARPCTC_LIB_DIR
}
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
endif
()
############### test_RecurrentGradientMachine ###############
...
...
@@ -116,20 +116,20 @@ add_unittest_without_exec(test_RecurrentGradientMachine
test_RecurrentGradientMachine.cpp
)
add_test
(
NAME test_RecurrentGradientMachine
COMMAND .set_python_path.sh -d
${
P
ROJ_ROOT
}
/python:
${
PROJ_ROOT
}
/paddle/gserver/tests
${
P
ADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_RecurrentGradientMachine
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
add_unittest_without_exec
(
test_NetworkCompare
test_NetworkCompare.cpp
)
if
(
WITH_GPU
)
add_test
(
NAME test_NetworkCompare
COMMAND .set_python_path.sh -d
${
P
ROJ_ROOT
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=true
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
COMMAND .set_python_path.sh -d
${
P
ADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=true
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
else
()
add_test
(
NAME test_NetworkCompare
COMMAND .set_python_path.sh -d
${
P
ROJ_ROOT
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=false
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
)
COMMAND .set_python_path.sh -d
${
P
ADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=false
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
endif
()
...
...
@@ -137,6 +137,6 @@ add_unittest_without_exec(test_PyDataProvider2
test_PyDataProvider2.cpp
)
add_test
(
NAME test_PyDataProvider2
COMMAND .set_python_path.sh -d
${
P
ROJ_ROOT
}
/paddle/gserver/tests:
${
PROJ_ROOT
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider2
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle
COMMAND .set_python_path.sh -d
${
P
ADDLE_SOURCE_DIR
}
/paddle/gserver/tests:
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProvider2
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle
)
paddle/math/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -15,13 +15,13 @@
file
(
GLOB MATH_HEADERS . *.h
)
file
(
GLOB MATH_SOURCES . *.cpp
)
set
(
MATH_SOURCES
"
${
P
ROJ_ROOT
}
/paddle/math/BaseMatrix.cu"
"
${
P
ROJ_ROOT
}
/paddle/math/TrainingAlgorithmOp.cu"
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/math/BaseMatrix.cu"
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/math/TrainingAlgorithmOp.cu"
${
MATH_SOURCES
}
)
if
(
NOT WITH_GPU
)
# then compile BaseMatrix.cu as c++ file
compile_cu_as_cpp
(
"
${
P
ROJ_ROOT
}
/paddle/math/BaseMatrix.cu"
)
compile_cu_as_cpp
(
"
${
P
ROJ_ROOT
}
/paddle/math/TrainingAlgorithmOp.cu"
)
compile_cu_as_cpp
(
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/math/BaseMatrix.cu"
)
compile_cu_as_cpp
(
"
${
P
ADDLE_SOURCE_DIR
}
/paddle/math/TrainingAlgorithmOp.cu"
)
add_library
(
paddle_math STATIC
${
MATH_SOURCES
}
)
else
()
...
...
paddle/pserver/test/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -3,7 +3,7 @@ add_unittest_without_exec(socket_test
SocketTest.cpp
)
add_test
(
NAME socket_test
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_port.sh -p port
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/socket_test --loop_time=10
)
####################### test_ProtoServer ####################
...
...
@@ -12,7 +12,7 @@ add_unittest_without_exec(test_ProtoServer
IF
(
NOT ON_TRAVIS
)
add_test
(
NAME test_ProtoServer
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_port.sh -p port
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_ProtoServer
)
ENDIF
(
NOT ON_TRAVIS
)
...
...
@@ -24,5 +24,5 @@ ENDIF(NOT ON_TRAVIS)
add_unittest_without_exec
(
test_ParameterServer2
test_ParameterServer2.cpp
)
add_test
(
NAME test_ParameterServer2
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_port.sh -p port -n 4
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port -n 4
${
CMAKE_CURRENT_BINARY_DIR
}
/test_ParameterServer2
)
paddle/trainer/tests/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -2,19 +2,19 @@
add_unittest_without_exec
(
test_Compare
test_Compare.cpp
)
add_test
(
NAME test_Compare
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_Compare
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
################# test_Trainer ###########################
add_unittest_without_exec
(
test_Trainer
test_Trainer.cpp
)
add_test
(
NAME test_Trainer
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ROJ_ROOT
}
/paddle/trainer/tests/gen_proto_data.py &&
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/paddle/trainer/tests/gen_proto_data.py &&
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_Trainer
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
############### test_TrainerOnePass ##########################
if
(
WITH_PYTHON
)
...
...
@@ -23,60 +23,60 @@ if(WITH_PYTHON)
add_unittest_without_exec
(
test_TrainerOnePass
test_TrainerOnePass.cpp
)
add_test
(
NAME test_TrainerOnePass
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
P
ROJ_ROOT
}
/python/:
${
PROJ_ROOT
}
/paddle/trainer/tests
${
P
ROJ_ROOT
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_TrainerOnePass
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
P
ADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_port.sh -p port
${
CMAKE_CURRENT_BINARY_DIR
}
/test_TrainerOnePass
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
endif
()
################ test_CompareTwoNets ######################
add_unittest_without_exec
(
test_CompareTwoNets
test_CompareTwoNets.cpp
)
add_test
(
NAME test_CompareTwoNets
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareTwoNets
--config_file_a=trainer/tests/sample_trainer_config_qb_rnn.conf --config_file_b=trainer/tests/sample_trainer_config_rnn.conf
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
############### test_CompareTwoOpts ###################
add_unittest_without_exec
(
test_CompareTwoOpts
test_CompareTwoOpts.cpp
)
add_test
(
NAME test_CompareTwoOpts
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareTwoOpts
--config_file_a=trainer/tests/sample_trainer_config_opt_a.conf --config_file_b=trainer/tests/sample_trainer_config_opt_b.conf
--num_passes=1 --need_high_accuracy=0
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
################# test_CompareSparse ##################
add_unittest_without_exec
(
test_CompareSparse
test_CompareSparse.cpp
)
if
(
NOT ON_TRAVIS
)
add_test
(
NAME test_CompareSparse
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
./.set_port.sh -p port -n 6
${
CMAKE_CURRENT_BINARY_DIR
}
/test_CompareSparse
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
endif
()
################# test_recurrent_machine_generation ###############
add_unittest_without_exec
(
test_recurrent_machine_generation
test_recurrent_machine_generation.cpp
)
add_test
(
NAME test_recurrent_machine_generation
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
CMAKE_CURRENT_BINARY_DIR
}
/test_recurrent_machine_generation
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
#################### test_PyDataProviderWrapper #########################
add_unittest_without_exec
(
test_PyDataProviderWrapper
test_PyDataProviderWrapper.cpp
)
add_test
(
NAME test_PyDataProviderWrapper
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
P
ROJ_ROOT
}
/python/:
${
PROJ_ROOT
}
/paddle/trainer/tests
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
P
ADDLE_SOURCE_DIR
}
/python/:
${
PADDLE_SOURCE_DIR
}
/paddle/trainer/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_PyDataProviderWrapper
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
#################### test_config_parser #########################
add_test
(
NAME test_config_parser
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ROJ_ROOT
}
/paddle/trainer/tests/config_parser_test.py
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/paddle/
)
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/paddle/trainer/tests/config_parser_test.py
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/paddle/
)
paddle/utils/tests/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -13,6 +13,6 @@ add_executable(
link_paddle_exe
(
test_CustomStackTracePrint
)
if
(
NOT APPLE
)
add_test
(
NAME test_CustomStackTracePrint
COMMAND
${
P
ROJ_ROOT
}
/paddle/utils/tests/test_CustomStackTracePrint.sh
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/utils/tests/test_CustomStackTracePrint.sh
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
endif
()
proto/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -9,13 +9,13 @@ foreach(filename ${proto_filenames})
get_filename_component
(
ABS_FIL
${
filename
}
ABSOLUTE
)
get_filename_component
(
FIL_WE
${
filename
}
NAME_WE
)
set
(
CUR_PROTO_GEN_PY
${
P
ROJ_ROOT
}
/paddle/python/paddle/proto/
${
FIL_WE
}
_pb2.py
)
${
P
ADDLE_SOURCE_DIR
}
/paddle/python/paddle/proto/
${
FIL_WE
}
_pb2.py
)
set
(
PROTO_GEN_PY
${
CUR_PROTO_GEN_PY
}
${
PROTO_GEN_PY
}
)
add_custom_command
(
OUTPUT
${
CUR_PROTO_GEN_PY
}
COMMAND
${
PROTOBUF_PROTOC_EXECUTABLE
}
ARGS
"--python_out=
${
P
ROJ_ROOT
}
/python/paddle/proto"
ARGS
"--python_out=
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/proto"
"-I"
${
CMAKE_CURRENT_SOURCE_DIR
}
${
ABS_FIL
}
DEPENDS
${
ABS_FIL
}
protoc
)
endforeach
()
...
...
python/CMakeLists.txt
浏览文件 @
7a56d46a
...
...
@@ -18,7 +18,7 @@ SET(COPY_PADDLE_MASTER "")
if
(
WITH_GOLANG
)
SET
(
COPY_PADDLE_MASTER
"copy_paddle_master"
)
add_custom_command
(
TARGET
${
COPY_PADDLE_MASTER
}
COMMAND cp
${
paddle_master_LIB_PATH
}
${
P
ROJ_ROOT
}
/python/paddle/v2/master/
COMMAND cp
${
paddle_master_LIB_PATH
}
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/v2/master/
)
add_dependencies
(
copy_paddle_master paddle_master
)
endif
(
WITH_GOLANG
)
...
...
@@ -27,10 +27,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
${
CMAKE_CURRENT_BINARY_DIR
}
/setup.py
)
add_custom_command
(
OUTPUT
${
P
ROJ_ROOT
}
/python/paddle/v2/framework/core.so
COMMAND cmake -E copy $<TARGET_FILE:paddle_pybind>
${
P
ROJ_ROOT
}
/python/paddle/v2/framework/core.so
add_custom_command
(
OUTPUT
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/v2/framework/core.so
COMMAND cmake -E copy $<TARGET_FILE:paddle_pybind>
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/v2/framework/core.so
DEPENDS paddle_pybind
)
add_custom_target
(
copy_paddle_pybind ALL DEPENDS
${
P
ROJ_ROOT
}
/python/paddle/v2/framework/core.so
)
add_custom_target
(
copy_paddle_pybind ALL DEPENDS
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/v2/framework/core.so
)
add_custom_command
(
OUTPUT
${
OUTPUT_DIR
}
/.timestamp
...
...
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
浏览文件 @
7a56d46a
#################### test_config_parser #########################
add_test
(
NAME layers_test
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/layers_test.py
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/python/paddle
)
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/trainer_config_helpers/tests/layers_test.py
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/python/paddle
)
add_test
(
NAME test_reset_hook
COMMAND
${
P
ROJ_ROOT
}
/paddle/.set_python_path.sh -d
${
PROJ_ROOT
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/test_reset_hook.py
WORKING_DIRECTORY
${
P
ROJ_ROOT
}
/python/paddle
)
COMMAND
${
P
ADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python/
${
PYTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/trainer_config_helpers/tests/test_reset_hook.py
WORKING_DIRECTORY
${
P
ADDLE_SOURCE_DIR
}
/python/paddle
)
add_paddle_exe
(
protobuf_equal ProtobufEqualMain.cpp
)
add_test
(
NAME test_layerHelpers
COMMAND
${
P
ROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
${
P
ADDLE_SOURCE_DIR
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_BINARY_DIR
}
/protobuf_equal
)
python/setup.py.in
浏览文件 @
7a56d46a
...
...
@@ -45,14 +45,14 @@ setup(name='paddlepaddle',
'': '${CMAKE_CURRENT_SOURCE_DIR}',
# The paddle.v2.framework.proto will be generated while compiling.
# So that package points to other directory.
'paddle.v2.framework.proto': '${P
ROJ_BINARY_ROOT
}/paddle/framework',
'py_paddle': '${P
ROJ_ROOT
}/paddle/py_paddle'
'paddle.v2.framework.proto': '${P
ADDLE_BINARY_DIR
}/paddle/framework',
'py_paddle': '${P
ADDLE_SOURCE_DIR
}/paddle/py_paddle'
},
scripts=['${P
ROJ_BINARY_ROOT
}/paddle/scripts/paddle'],
scripts=['${P
ADDLE_BINARY_DIR
}/paddle/scripts/paddle'],
distclass=BinaryDistribution,
data_files=[('/usr/local/opt/paddle/bin',
['${P
ROJ_BINARY_ROOT
}/paddle/scripts/paddle_usage',
'${P
ROJ_BINARY_ROOT
}/paddle/trainer/paddle_trainer',
'${P
ROJ_BINARY_ROOT
}/paddle/trainer/paddle_merge_model',
'${P
ROJ_BINARY_ROOT
}/paddle/pserver/paddle_pserver_main'])]
['${P
ADDLE_BINARY_DIR
}/paddle/scripts/paddle_usage',
'${P
ADDLE_BINARY_DIR
}/paddle/trainer/paddle_trainer',
'${P
ADDLE_BINARY_DIR
}/paddle/trainer/paddle_merge_model',
'${P
ADDLE_BINARY_DIR
}/paddle/pserver/paddle_pserver_main'])]
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录