Skip to content

Commit

Permalink
solve int overflow (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunderbrook committed Jun 12, 2022
1 parent 68c2cc4 commit ba5d709
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion paddle/fluid/framework/fleet/heter_ps/heter_comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class HeterComm {
#endif
}

void create_storage(int start_index, int end_index, int keylen, int vallen);
void create_storage(int start_index, int end_index, size_t keylen, size_t vallen);
void destroy_storage(int start_index, int end_index);
void walk_to_dest(int start_index, int gpu_num, int* h_left, int* h_right,
KeyType* src_key, GradType* src_val);
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/framework/fleet/heter_ps/heter_comm_inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ void HeterComm<KeyType, ValType, GradType>::memory_copy(
template <typename KeyType, typename ValType, typename GradType>
void HeterComm<KeyType, ValType, GradType>::create_storage(int start_index,
int end_index,
int keylen,
int vallen) {
size_t keylen,
size_t vallen) {
#if defined(PADDLE_WITH_CUDA)
auto& allocator = allocators_[start_index];
auto& nodes = path_[start_index][end_index].nodes_;
Expand Down

0 comments on commit ba5d709

Please sign in to comment.