Skip to content

Commit

Permalink
if parameters are small enough with multiple virtual pservers, null r…
Browse files Browse the repository at this point in the history
…equest comes,

so just filter these initializations.
  • Loading branch information
backyes committed Oct 27, 2016
1 parent 9c5c38f commit e1733c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddle/pserver/ParameterServer2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ void ParameterServer2::setParameter(const SendParameterRequest& request,
std::vector<int64_t> blockIds;
blockIds.reserve(request.blocks_size());
int bufferIndex = 0;

if (!request.blocks().size()) { return; }

for (const auto& block : request.blocks()) {
/// block size for parameter(e.g. 128 for sparse row, 1K for dense)
uint64_t blockSize = getParameterConfig(block).parameter_block_size();
Expand Down

0 comments on commit e1733c4

Please sign in to comment.