Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#1239 from helinwang/issue_1238
Browse files Browse the repository at this point in the history
remove `allow_inefficient_sparse_update` since it's only defined but …
  • Loading branch information
helinwang authored Jan 30, 2017
2 parents 5edbe32 + 6911b84 commit 4bb0a0d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 29 deletions.
5 changes: 0 additions & 5 deletions doc/howto/usage/cmd_parameter/arguments_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
</tr>

<tr>
<td class="left">allow_inefficient_sparse_update</td>
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
</tr>

<tr>
<td class="left">start_pass</td>
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
Expand Down
5 changes: 0 additions & 5 deletions doc/howto/usage/cmd_parameter/arguments_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ It looks like there are a lot of arguments. However, most of them are for develo
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
</tr>

<tr>
<td class="left">allow_inefficient_sparse_update</td>
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
</tr>

<tr>
<td class="left">start_pass</td>
<td class="left">√</td><td class="left">√</td><td class="left"></td><td class="left"></td>
Expand Down
4 changes: 0 additions & 4 deletions doc/howto/usage/cmd_parameter/detail_introduction_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,6 @@
- 指示是否显示参数服务器上的稀疏参数分布的日志细节.
- 类型: bool (默认: 0).

* `--allow_inefficient_sparse_update`
- 指示是否允许低效率的稀疏更新.
- 类型: bool (默认: 0).

* `--check_sparse_distribution_batches`
- 每运行多少个批次执行一次稀疏参数分布的检查.
- 类型: int32 (默认: 100).
Expand Down
4 changes: 0 additions & 4 deletions doc/howto/usage/cmd_parameter/detail_introduction_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,6 @@
- show log details for sparse parameter distribution in pserver.
- type: bool (default: 0).

* `--allow_inefficient_sparse_update`
- Whether to allow inefficient sparse update.
- type: bool (default: 0).

* `--check_sparse_distribution_batches`
- Running sparse parameter distribution check every so many batches.
- type: int32 (default: 100).
Expand Down
4 changes: 0 additions & 4 deletions paddle/math/SparseRowMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ limitations under the License. */
#include "paddle/utils/Thread.h"
#include "paddle/utils/Util.h"

DEFINE_bool(allow_inefficient_sparse_update,
false,
"Whether to allow inefficient sparse update");

namespace paddle {

const unsigned int SparseRowCpuMatrix::kUnusedId_ = -1U;
Expand Down
11 changes: 4 additions & 7 deletions paddle/math/SparseRowMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ limitations under the License. */
#include "RowBuffer.h"
#include "paddle/utils/Util.h"

DECLARE_bool(allow_inefficient_sparse_update);

namespace paddle {

/**
Expand Down Expand Up @@ -183,11 +181,10 @@ class SparseRowCpuMatrix : public CpuMatrix {
inline void checkStoreSize() {
if (buf_->isAutoGrowth()) {
if (buf_->getRowCount() > 0.5 * height_) {
LOG(WARNING)
<< "There are more than 0.5*height (" << localIndices_->size()
<< ") rows are used for sparse "
<< "update, which is not efficient. Considering not use "
<< "sparse_update or set --allow_inefficient_sparse_update=true";
LOG(WARNING) << "There are more than 0.5*height ("
<< localIndices_->size() << ") rows are used for sparse "
<< "update, which is not efficient. Considering not use "
<< "sparse_update.";
}
} else {
CHECK_LE(localIndices_->size(), buf_->getRowCount());
Expand Down

0 comments on commit 4bb0a0d

Please sign in to comment.