Skip to content

Commit

Permalink
common: support huge tensor better (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymjiang authored Sep 27, 2021
1 parent 6826110 commit 57452c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions byteps/common/operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Status EnqueueTensor(BPSContext &context, std::shared_ptr<Tensor> input,
context.comm_time.push(ret);
}

unsigned int accumulated = 0;
size_t accumulated = 0;
for (size_t i = 0; i < partitions.size(); ++i) {
auto task = partitions[i];
task->key = context.key_list[i]; // assign the key now
Expand Down Expand Up @@ -320,7 +320,7 @@ void InitTensor(BPSContext &context, size_t size, int dtype, void *cpubuff) {

BPS_CHECK_GT(key_list.size(), 0) << name;
BPS_CHECK_EQ(key_list.size(),
(unsigned int)(size + bound - 1) / bound) // round up
(size_t)(size + bound - 1) / bound) // round up
<< key_list.size() << ", size=" << size << ", bound=" << bound;

BPS_LOG(TRACE) << "Begin init " << name << ", size=" << size
Expand Down

0 comments on commit 57452c8

Please sign in to comment.