Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
3ede8b67
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
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看板
提交
3ede8b67
编写于
1月 18, 2019
作者:
T
Tao Luo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update CMakeLists.txt
上级
5316c647
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
5 addition
and
127 deletion
+5
-127
CMakeLists.txt
CMakeLists.txt
+0
-18
paddle/CMakeLists.txt
paddle/CMakeLists.txt
+2
-28
paddle/fluid/operators/positive_negative_pair_op.h
paddle/fluid/operators/positive_negative_pair_op.h
+0
-1
paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h
...le/fluid/operators/sigmoid_cross_entropy_with_logits_op.h
+0
-1
paddle/testing/CMakeLists.txt
paddle/testing/CMakeLists.txt
+1
-9
python/CMakeLists.txt
python/CMakeLists.txt
+2
-38
python/setup.py.in
python/setup.py.in
+0
-32
未找到文件。
CMakeLists.txt
浏览文件 @
3ede8b67
...
...
@@ -279,9 +279,6 @@ include(inference_lib) # add paddle fluid inference libraries
include_directories
(
"
${
PADDLE_SOURCE_DIR
}
"
)
include_directories
(
"
${
PADDLE_SOURCE_DIR
}
/paddle/legacy/cuda/include"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/proto"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/go/pserver/client/c"
)
set
(
EXTERNAL_LIBS
gflags
...
...
@@ -320,21 +317,6 @@ if(USE_NNPACK)
list
(
APPEND EXTERNAL_LIBS
${
NNPACK_LIBS
}
)
endif
(
USE_NNPACK
)
add_subdirectory
(
proto
)
if
(
NOT MOBILE_INFERENCE AND NOT WITH_FLUID_ONLY
)
# "add_subdirectory(go)" should be placed after the following loine,
# because it depends on paddle/optimizer.
add_subdirectory
(
paddle/legacy/optimizer
)
endif
()
# "add_subdirectory(paddle)" and "add_subdirectory(python)" should be
# placed after this block, because they depends on it.
if
(
WITH_GOLANG
)
enable_language
(
Go
)
add_subdirectory
(
go
)
endif
(
WITH_GOLANG
)
set
(
PADDLE_PYTHON_BUILD_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
/python/build"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O3 -g -DNDEBUG"
)
...
...
paddle/CMakeLists.txt
浏览文件 @
3ede8b67
if
(
NOT WITH_FLUID_ONLY
)
add_subdirectory
(
legacy/cuda
)
add_subdirectory
(
legacy/function
)
add_subdirectory
(
legacy/utils
)
add_subdirectory
(
legacy/math
)
add_subdirectory
(
legacy/gserver
)
add_subdirectory
(
legacy/parameter
)
if
(
MOBILE_INFERENCE
)
add_subdirectory
(
legacy/capi
)
else
()
add_subdirectory
(
legacy/pserver
)
add_subdirectory
(
legacy/trainer
)
add_subdirectory
(
scripts
)
if
(
WITH_C_API
)
add_subdirectory
(
legacy/capi
)
endif
()
if
(
WITH_SWIG_PY
)
add_subdirectory
(
legacy/api
)
endif
()
endif
()
endif
()
add_subdirectory
(
scripts
)
add_subdirectory
(
testing
)
set
(
PYTHON_TESTS_DIR
${
PADDLE_BINARY_DIR
}
/python/paddle/fluid/tests CACHE INTERNAL
"python tests directory"
)
if
(
NOT MOBILE_INFERENCE AND NOT RPI AND NOT WITH_C_API
)
add_subdirectory
(
fluid
)
endif
()
add_subdirectory
(
fluid
)
paddle/fluid/operators/positive_negative_pair_op.h
浏览文件 @
3ede8b67
...
...
@@ -14,7 +14,6 @@ limitations under the License. */
#include <vector>
#include "paddle/fluid/framework/eigen.h"
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/legacy/utils/Logging.h"
namespace
paddle
{
namespace
operators
{
...
...
paddle/fluid/operators/sigmoid_cross_entropy_with_logits_op.h
浏览文件 @
3ede8b67
...
...
@@ -16,7 +16,6 @@ limitations under the License. */
#include "paddle/fluid/framework/eigen.h"
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/platform/hostdevice.h"
#include "paddle/legacy/utils/Logging.h"
namespace
paddle
{
namespace
operators
{
...
...
paddle/testing/CMakeLists.txt
浏览文件 @
3ede8b67
# for paddle test case
if
(
WITH_TESTING
)
add_library
(
paddle_test_main STATIC TestMain.cpp
)
add_dependencies
(
paddle_test_main paddle_proto
${
external_project_dependencies
}
)
if
(
NOT WIN32
)
add_library
(
paddle_test_util STATIC TestUtil.cpp
)
add_dependencies
(
paddle_test_util paddle_proto
${
external_project_dependencies
}
)
endif
(
NOT WIN32
)
if
(
NOT MOBILE_INFERENCE
)
cc_library
(
paddle_gtest_main SRCS paddle_gtest_main.cc DEPS device_context memory gtest gflags
)
endif
()
cc_library
(
paddle_gtest_main SRCS paddle_gtest_main.cc DEPS device_context memory gtest gflags
)
endif
()
python/CMakeLists.txt
浏览文件 @
3ede8b67
...
...
@@ -4,27 +4,6 @@ set(PY_FILES paddle/__init__.py
${
UTILS_PY_FILES
}
${
FLUID_PY_FILES
}
)
if
(
NOT WITH_FLUID_ONLY
)
file
(
GLOB TRAINER_PY_FILES . ./paddle/trainer/*.py
)
file
(
GLOB HELPERS_PY_FILES . ./paddle/trainer_config_helpers/*.py
)
file
(
GLOB_RECURSE V2_PY_FILES ./paddle/v2/*.py
)
set
(
PY_FILES
${
PY_FILES
}
${
TRAINER_PY_FILES
}
${
HELPERS_PY_FILES
}
${
V2_PY_FILES
}
)
add_custom_target
(
copy_paddle_master
)
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
}
${
PADDLE_SOURCE_DIR
}
/python/paddle/v2/master/
)
add_dependencies
(
copy_paddle_master paddle_master
)
endif
(
WITH_GOLANG
)
endif
()
set
(
MKL_SHARED_LIBS
""
)
set
(
MKL_DEPENDS
""
)
if
(
WITH_MKLML
)
...
...
@@ -64,7 +43,7 @@ IF(WIN32)
COMMAND
${
CMAKE_COMMAND
}
-E env
${
py_env
}
${
PYTHON_EXECUTABLE
}
setup.py bdist_wheel
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
DEPENDS
gen_proto_py
copy_paddle_pybind
${
FLUID_CORE
}
framework_py_proto profiler_py_proto
${
PY_FILES
}
${
external_project_dependencies
}
${
COPY_PADDLE_MASTER
}
)
DEPENDS copy_paddle_pybind
${
FLUID_CORE
}
framework_py_proto profiler_py_proto
${
PY_FILES
}
${
external_project_dependencies
}
${
COPY_PADDLE_MASTER
}
)
ELSE
(
WIN32
)
add_custom_command
(
OUTPUT
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND touch stub.cc
...
...
@@ -74,16 +53,10 @@ ELSE(WIN32)
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
PADDLE_PYTHON_BUILD_DIR
}
/lib*
${
PADDLE_PYTHON_BUILD_DIR
}
/lib-python
DEPENDS
gen_proto_py
copy_paddle_pybind
${
FLUID_CORE
}
framework_py_proto profiler_py_proto
${
PY_FILES
}
${
external_project_dependencies
}
${
COPY_PADDLE_MASTER
}
)
DEPENDS copy_paddle_pybind
${
FLUID_CORE
}
framework_py_proto profiler_py_proto
${
PY_FILES
}
${
external_project_dependencies
}
${
COPY_PADDLE_MASTER
}
)
ENDIF
()
set
(
paddle_python_deps
${
PADDLE_PYTHON_BUILD_DIR
}
/.timestamp
${
MKL_DEPENDS
}
)
if
(
NOT WITH_FLUID_ONLY
)
set
(
paddle_python_deps
${
paddle_python_deps
}
paddle_pserver_main paddle_trainer paddle_merge_model
)
if
(
WITH_SWIG_PY
)
list
(
APPEND paddle_python_deps python_api_wheel
)
endif
()
endif
()
add_custom_target
(
paddle_python ALL DEPENDS
${
paddle_python_deps
}
)
set
(
PADDLE_PYTHON_PACKAGE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
)
...
...
@@ -91,15 +64,6 @@ set(PADDLE_PYTHON_PACKAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/dist/)
if
(
WITH_TESTING
)
add_subdirectory
(
paddle/reader/tests
)
add_subdirectory
(
paddle/dataset/tests
)
if
(
NOT WITH_FLUID_ONLY
)
add_subdirectory
(
paddle/trainer_config_helpers/tests
)
if
(
WITH_SWIG_PY
)
# enable v2 API unittest only when paddle swig api is compiled
add_subdirectory
(
paddle/v2/tests
)
add_subdirectory
(
paddle/v2/plot/tests
)
add_subdirectory
(
paddle/v2/reader/tests
)
endif
()
endif
()
add_subdirectory
(
paddle/fluid/tests
)
add_subdirectory
(
paddle/fluid/contrib/tests
)
endif
()
...
...
python/setup.py.in
浏览文件 @
3ede8b67
...
...
@@ -117,17 +117,6 @@ packages=['paddle',
'paddle.fluid.transpiler',
'paddle.fluid.transpiler.details']
if '${WITH_FLUID_ONLY}'== 'OFF':
packages+=['paddle.proto',
'paddle.trainer',
'paddle.trainer_config_helpers',
'paddle.v2',
'paddle.v2.master',
'paddle.v2.plot',
'paddle.v2.reader',
'paddle.v2.dataset',
'py_paddle']
with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f:
setup_requires = f.read().splitlines()
...
...
@@ -136,19 +125,8 @@ if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
# the prefix is sys.prefix which should always be usr
paddle_bins = ''
if '${WITH_FLUID_ONLY}'== 'OFF':
paddle_bin_dir = 'opt/paddle/bin'
paddle_bins = ['${PADDLE_BINARY_DIR}/paddle/legacy/trainer/paddle_trainer',
'${PADDLE_BINARY_DIR}/paddle/legacy/trainer/paddle_merge_model',
'${PADDLE_BINARY_DIR}/paddle/legacy/pserver/paddle_pserver_main',
'${PADDLE_BINARY_DIR}/paddle/scripts/paddle']
package_data={'paddle.fluid': ['core' + (ext_name if os.name != 'nt' else '.pyd')]}
if '${WITH_FLUID_ONLY}'== 'OFF':
package_data['paddle.v2.master']=['libpaddle_master' + ext_name]
package_data['py_paddle']=['*.py','_swig_paddle' + ext_name]
package_dir={
'': '${PADDLE_BINARY_DIR}/python',
# The paddle.fluid.proto will be generated while compiling.
...
...
@@ -157,8 +135,6 @@ package_dir={
'paddle.fluid.proto': '${PADDLE_BINARY_DIR}/paddle/fluid/framework',
'paddle.fluid': '${PADDLE_BINARY_DIR}/python/paddle/fluid',
}
if '${WITH_FLUID_ONLY}'== 'OFF':
package_dir['py_paddle']='${PADDLE_BINARY_DIR}/python/py_paddle'
# put all thirdparty libraries in paddle.libs
libs_path='${PADDLE_BINARY_DIR}/python/paddle/libs'
...
...
@@ -226,14 +202,6 @@ if '${CMAKE_BUILD_TYPE}' == 'Release':
command = "patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/fluid/core" + ext_name
if os.system(command) != 0:
raise Exception("patch core.%s failed, command: %s" % (ext_name, command))
if '${WITH_FLUID_ONLY}'== 'OFF':
# change rpath of _swig_paddle.xx.
if "@APPLE@" == "1":
command = "install_name_tool -id \"@loader_path/../paddle/libs/\" ${PADDLE_BINARY_DIR}/python/py_paddle/_swig_paddle" + ext_name
else:
command = "patchelf --set-rpath '$ORIGIN/../paddle/libs/' ${PADDLE_BINARY_DIR}/python/py_paddle/_swig_paddle" + ext_name
if os.system(command) != 0:
raise Exception("patch _swig_paddle.%s failed, command: %s" % (ext_name, command))
ext_modules = [Extension('_foo', ['stub.cc'])]
if os.name == 'nt':
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录