未验证 提交 5dfbb229 编写于 作者: R risemeup1 提交者: GitHub

fix ps_proto_bug (#51449)

上级 f2fe7c6e
......@@ -4,8 +4,12 @@ add_subdirectory(fleet_executor)
if(WITH_PYTHON)
py_proto_compile(pslib_py_proto SRCS ps.proto)
py_proto_compile(ps_py_proto SRCS the_one_ps.proto)
file(MAKE_DIRECTORY
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
add_custom_target(ps_py_proto_init)
add_custom_command(
TARGET ps_py_proto_init
COMMAND ${CMAKE_COMMAND} -E make_directory
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
add_dependencies(ps_py_proto ps_py_proto_init)
set(PSLIB_PROTO_DSTPATH
"${PADDLE_SOURCE_DIR}/python/paddle/incubate/distributed/fleet/parameter_server/pslib/"
)
......
......@@ -581,14 +581,24 @@ if(WITH_PYTHON)
py_proto_compile(pass_desc_py_proto SRCS pass_desc.proto)
#Generate an empty \
#__init__.py to make framework_py_proto as a valid python module.
file(MAKE_DIRECTORY
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto)
file(TOUCH
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto/__init__.py)
add_custom_target(fleet_proto_init)
add_custom_command(
TARGET fleet_proto_init
COMMAND ${CMAKE_COMMAND} -E make_directory
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto
COMMAND
${CMAKE_COMMAND} -E touch
${PADDLE_BINARY_DIR}/python/paddle/distributed/fleet/proto/__init__.py)
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/__init__.py)
add_dependencies(
framework_py_proto trainer_py_proto distributed_strategy_py_proto
pass_desc_py_proto ps_py_proto pslib_py_proto)
framework_py_proto
trainer_py_proto
distributed_strategy_py_proto
fleet_proto_init
pass_desc_py_proto
ps_py_proto
pslib_py_proto
ps_py_proto_init)
if(NOT WIN32)
add_custom_command(
TARGET framework_py_proto
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册