Skip to content

Commit

Permalink
Malloc at least 1 byte for MultiGPU P2PSync buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
ronghanghu committed Aug 16, 2015
1 parent 25b4920 commit 09868ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/caffe/parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ static void apply_buffers(const vector<Blob<Dtype>*>& blobs,
}
ptr += size;
}
CHECK_EQ(total_size, ptr - buffer);
// total_size is at least one byte
CHECK_EQ(total_size, (ptr == buffer ? 1 : ptr - buffer));
}

// Buffer size necessary to store given blobs
Expand Down

0 comments on commit 09868ac

Please sign in to comment.