|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
#windows treat symbolic file as a real file, which is different with unix
|
|
|
|
#windows treat symbolic file as a real file, which is different with unix
|
|
|
|
#We create a hidden file and compile it instead of origin source file.
|
|
|
|
#We create a hidden file and compile it instead of origin source file.
|
|
|
|
function(windows_symbolic TARGET)
|
|
|
|
function(windows_symbolic TARGET)
|
|
|
@ -22,9 +23,11 @@ endfunction()
|
|
|
|
|
|
|
|
|
|
|
|
add_subdirectory(ir)
|
|
|
|
add_subdirectory(ir)
|
|
|
|
add_subdirectory(details)
|
|
|
|
add_subdirectory(details)
|
|
|
|
|
|
|
|
add_subdirectory(fleet)
|
|
|
|
#ddim lib
|
|
|
|
#ddim lib
|
|
|
|
proto_library(framework_proto SRCS framework.proto)
|
|
|
|
proto_library(framework_proto SRCS framework.proto)
|
|
|
|
proto_library(async_executor_proto SRCS data_feed.proto)
|
|
|
|
proto_library(async_executor_proto SRCS data_feed.proto)
|
|
|
|
|
|
|
|
proto_library(trainer_desc_proto SRCS trainer_desc.proto)
|
|
|
|
|
|
|
|
|
|
|
|
cc_library(ddim SRCS ddim.cc DEPS eigen3 boost enforce)
|
|
|
|
cc_library(ddim SRCS ddim.cc DEPS eigen3 boost enforce)
|
|
|
|
cc_test(ddim_test SRCS ddim_test.cc DEPS ddim)
|
|
|
|
cc_test(ddim_test SRCS ddim_test.cc DEPS ddim)
|
|
|
@ -129,9 +132,16 @@ cc_test(version_test SRCS version_test.cc DEPS version)
|
|
|
|
cc_library(proto_desc SRCS var_desc.cc op_desc.cc block_desc.cc program_desc.cc DEPS shape_inference op_info operator glog version)
|
|
|
|
cc_library(proto_desc SRCS var_desc.cc op_desc.cc block_desc.cc program_desc.cc DEPS shape_inference op_info operator glog version)
|
|
|
|
|
|
|
|
|
|
|
|
cc_library(op_registry SRCS op_registry.cc DEPS op_proto_maker op_info operator glog proto_desc memory_optimize_helper)
|
|
|
|
cc_library(op_registry SRCS op_registry.cc DEPS op_proto_maker op_info operator glog proto_desc memory_optimize_helper)
|
|
|
|
|
|
|
|
if(WITH_NGRAPH)
|
|
|
|
|
|
|
|
cc_library(ngraph_bridge SRCS ngraph_bridge.cc DEPS operator framework_proto ngraph)
|
|
|
|
|
|
|
|
cc_library(ngraph_operator SRCS ngraph_operator.cc DEPS ngraph_bridge operator op_info device_context tensor scope glog
|
|
|
|
|
|
|
|
shape_inference data_transform lod_tensor profiler)
|
|
|
|
|
|
|
|
endif(WITH_NGRAPH)
|
|
|
|
|
|
|
|
|
|
|
|
nv_test(op_registry_test SRCS op_registry_test.cc DEPS op_registry)
|
|
|
|
nv_test(op_registry_test SRCS op_registry_test.cc DEPS op_registry)
|
|
|
|
|
|
|
|
|
|
|
|
py_proto_compile(framework_py_proto SRCS framework.proto data_feed.proto)
|
|
|
|
py_proto_compile(framework_py_proto SRCS framework.proto data_feed.proto)
|
|
|
|
|
|
|
|
py_proto_compile(trainer_py_proto SRCS trainer_desc.proto data_feed.proto)
|
|
|
|
#Generate an empty \
|
|
|
|
#Generate an empty \
|
|
|
|
#__init__.py to make framework_py_proto as a valid python module.
|
|
|
|
#__init__.py to make framework_py_proto as a valid python module.
|
|
|
|
add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py)
|
|
|
|
add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py)
|
|
|
@ -172,7 +182,11 @@ if(WITH_DISTRIBUTE)
|
|
|
|
set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
|
|
|
|
set(DISTRIBUTE_COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
|
|
|
|
set_source_files_properties(executor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
|
|
|
|
set_source_files_properties(executor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass variable_helper ${NGRAPH_EXE_DEPS})
|
|
|
|
if(WITH_NGRAPH)
|
|
|
|
|
|
|
|
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass ngraph_operator variable_helper)
|
|
|
|
|
|
|
|
else(WITH_NGRAPH)
|
|
|
|
|
|
|
|
cc_library(executor SRCS executor.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass variable_helper)
|
|
|
|
|
|
|
|
endif(WITH_NGRAPH)
|
|
|
|
cc_test(test_naive_executor SRCS naive_executor_test.cc DEPS naive_executor elementwise_add_op)
|
|
|
|
cc_test(test_naive_executor SRCS naive_executor_test.cc DEPS naive_executor elementwise_add_op)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
@ -184,9 +198,23 @@ cc_library(parallel_executor SRCS parallel_executor.cc DEPS
|
|
|
|
fast_threaded_ssa_graph_executor variable_helper)
|
|
|
|
fast_threaded_ssa_graph_executor variable_helper)
|
|
|
|
|
|
|
|
|
|
|
|
if(WITH_PSLIB)
|
|
|
|
if(WITH_PSLIB)
|
|
|
|
cc_library(async_executor SRCS async_executor.cc data_feed.cc data_feed_factory.cc executor_thread_worker.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass async_executor_proto variable_helper pslib_brpc pslib timer)
|
|
|
|
cc_library(async_executor SRCS async_executor.cc data_feed.cc data_feed_factory.cc
|
|
|
|
|
|
|
|
executor_thread_worker.cc multi_trainer.cc dist_multi_trainer.cc
|
|
|
|
|
|
|
|
trainer_factory.cc trainer.cc device_worker.cc hogwild_worker.cc
|
|
|
|
|
|
|
|
downpour_worker.cc pull_dense_worker.cc device_worker_factory.cc
|
|
|
|
|
|
|
|
DEPS op_registry device_context scope framework_proto
|
|
|
|
|
|
|
|
trainer_desc_proto glog lod_rank_table
|
|
|
|
|
|
|
|
feed_fetch_method graph_to_program_pass async_executor_proto
|
|
|
|
|
|
|
|
variable_helper pslib_brpc pslib timer)
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
cc_library(async_executor SRCS async_executor.cc data_feed.cc data_feed_factory.cc executor_thread_worker.cc DEPS op_registry device_context scope framework_proto glog lod_rank_table feed_fetch_method graph_to_program_pass async_executor_proto variable_helper timer)
|
|
|
|
cc_library(async_executor SRCS async_executor.cc data_feed.cc data_feed_factory.cc
|
|
|
|
|
|
|
|
executor_thread_worker.cc multi_trainer.cc dist_multi_trainer.cc
|
|
|
|
|
|
|
|
trainer_factory.cc trainer.cc device_worker.cc hogwild_worker.cc
|
|
|
|
|
|
|
|
downpour_worker.cc pull_dense_worker.cc device_worker_factory.cc
|
|
|
|
|
|
|
|
DEPS op_registry device_context scope framework_proto
|
|
|
|
|
|
|
|
trainer_desc_proto glog lod_rank_table
|
|
|
|
|
|
|
|
feed_fetch_method graph_to_program_pass async_executor_proto
|
|
|
|
|
|
|
|
variable_helper timer)
|
|
|
|
endif(WITH_PSLIB)
|
|
|
|
endif(WITH_PSLIB)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -211,24 +239,3 @@ endif (NOT WIN32)
|
|
|
|
|
|
|
|
|
|
|
|
cc_library(dlpack_tensor SRCS dlpack_tensor.cc DEPS tensor dlpack)
|
|
|
|
cc_library(dlpack_tensor SRCS dlpack_tensor.cc DEPS tensor dlpack)
|
|
|
|
cc_test(dlpack_tensor_test SRCS dlpack_tensor_test.cc DEPS dlpack_tensor glog)
|
|
|
|
cc_test(dlpack_tensor_test SRCS dlpack_tensor_test.cc DEPS dlpack_tensor glog)
|
|
|
|
|
|
|
|
|
|
|
|
# Get the current working branch
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
|
|
|
|
COMMAND git rev-parse --abbrev-ref HEAD
|
|
|
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
|
|
|
|
OUTPUT_VARIABLE PADDLE_BRANCH
|
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Get the latest abbreviated commit hash of the working branch
|
|
|
|
|
|
|
|
execute_process(
|
|
|
|
|
|
|
|
COMMAND git log -1 --format=%h
|
|
|
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
|
|
|
|
OUTPUT_VARIABLE PADDLE_COMMIT
|
|
|
|
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message(STATUS "commit: ${PADDLE_COMMIT}")
|
|
|
|
|
|
|
|
message(STATUS "branch: ${PADDLE_BRANCH}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configure_file(commit.h.in commit.h)
|
|
|
|
|
|
|
|