Skip to content

Commit ff09b21

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into feature/add_concat_rows
2 parents b9397b2 + 1f757f5 commit ff09b21

File tree

116 files changed

+2722
-969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2722
-969
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ script:
5656
export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
5757
export DOCS_DIR=`pwd`
5858
cd ..
59-
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/v2
59+
curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $DOCS_DIR $DOCS_DIR/build/doc/
6060
notifications:
6161
email:
6262
on_success: change

cmake/generic.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ function(cc_test TARGET_NAME)
244244
cmake_parse_arguments(cc_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
245245
add_executable(${TARGET_NAME} ${cc_test_SRCS})
246246
# Support linking flags: --whole-archive (Linux) / -force_load (MacOS)
247-
target_circle_link_libraries(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main paddle_memory gtest gflags)
247+
target_circle_link_libraries(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main paddle_memory gtest gflags glog)
248248
if("${cc_test_DEPS}" MATCHES "ARCHIVE_START")
249249
list(REMOVE_ITEM cc_test_DEPS ARCHIVE_START ARCHIVE_END)
250250
endif()
251-
add_dependencies(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main paddle_memory gtest gflags)
251+
add_dependencies(${TARGET_NAME} ${cc_test_DEPS} paddle_gtest_main paddle_memory gtest gflags glog)
252252
add_test(NAME ${TARGET_NAME}
253253
COMMAND ${TARGET_NAME} ${cc_test_ARGS}
254254
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
@@ -311,8 +311,8 @@ function(nv_test TARGET_NAME)
311311
set(multiValueArgs SRCS DEPS)
312312
cmake_parse_arguments(nv_test "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
313313
cuda_add_executable(${TARGET_NAME} ${nv_test_SRCS})
314-
target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main paddle_memory gtest gflags)
315-
add_dependencies(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main paddle_memory gtest gflags)
314+
target_link_libraries(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main paddle_memory gtest gflags glog)
315+
add_dependencies(${TARGET_NAME} ${nv_test_DEPS} paddle_gtest_main paddle_memory gtest gflags glog)
316316
add_test(${TARGET_NAME} ${TARGET_NAME})
317317
endif()
318318
endfunction(nv_test)

doc/design/cpp_data_feeding.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ class ReaderBase {
2020
PADDLE_ENFORCE(!shapes_.empty());
2121
}
2222
// Read the next batch of data. (A 'batch' can be only one instance)
23+
// If the next batch doesn't exist, the '*out' will be an empty std::vector.
2324
virtual void ReadNext(std::vector<LoDTensor>* out) = 0;
24-
// Show whether the next bacth exists.
25-
virtual bool HasNext() const = 0;
2625

2726
// Reinitialize the reader and read the file from the begin.
2827
virtual void ReInit() = 0;
File renamed without changes.
File renamed without changes.

doc/design/dist_refactor/parameter_server.md renamed to doc/design/fluid_dist/parameter_server.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,17 @@ After converting:
5959
queue. It will block until the queue has the required number of
6060
tensors.
6161

62+
### Sparse Update
63+
64+
For embedding layers, the gradient may have many rows containing only 0 when training,
65+
if the gradient uses a dense tensor to do parameter optimization,
66+
it could spend unnecessary memory, slow down the calculations and waste
67+
the bandwidth while doing distributed training.
68+
In Fluid, we introduce [SelectedRows](../selected_rows.md) to represent a list of rows containing
69+
non-zero gradient data. So when we do parameter optimization both locally and remotely,
70+
we only need to send those non-zero rows to the optimizer operators:
71+
72+
<img src="src/sparse_update.png" width="700" />
6273

6374
### Benefits
6475

@@ -91,6 +102,6 @@ After converting:
91102
`min_count` attribute), does our current design support it? (similar
92103
question for the *Add* OP)
93104

105+
### References
94106

95-
### References:
96107
[1] [TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45166.pdf)

0 commit comments

Comments
 (0)