diff --git a/paddle/operators/elementwise_op_function.h b/paddle/operators/elementwise_op_function.h index 65484f318ea7b2ef1fd82451753764db00a8e872..9edfacd6dfb506e12a0d82772d8de301bb8506e2 100644 --- a/paddle/operators/elementwise_op_function.h +++ b/paddle/operators/elementwise_op_function.h @@ -105,8 +105,8 @@ class MidWiseTransformIterator { ++j_; if (UNLIKELY(j_ == post_)) { ++i_; + j_ = 0; if (UNLIKELY(i_ == n_)) { - j_ = 0; i_ = 0; } } @@ -127,10 +127,10 @@ class MidWiseTransformIterator { private: const T* ptr_; - int i_; + int64_t i_; int64_t j_; int64_t n_; - int post_; + int64_t post_; }; #ifdef __NVCC__ diff --git a/paddle/operators/math/im2col.cc b/paddle/operators/math/im2col.cc index a746c267b60182f0465357672d56804ede45de05..d11a6afe9b38a90fc039ab42fbce4b49f9fe26a6 100644 --- a/paddle/operators/math/im2col.cc +++ b/paddle/operators/math/im2col.cc @@ -66,10 +66,10 @@ class Im2ColFunctor= 0 && im_row_offset < im_height && im_col_offset >= 0 && im_col_offset < im_width) { int im_offset =