diff --git a/paddle/operators/math/math_function_impl.h b/paddle/operators/math/math_function_impl.h index aced2690bce9a4c2db6309f18e23a8f6cd0211f3..ddd798dace17012b7d9a949567a90d48067e6b15 100644 --- a/paddle/operators/math/math_function_impl.h +++ b/paddle/operators/math/math_function_impl.h @@ -94,8 +94,8 @@ class ColwiseSum { T* out_buf = out->mutable_data(out->place()); const T* in_buf = input.data(); - for (size_t i = 0; i < height; ++i) { - for (size_t j = 0; j < size; ++j) { + for (size_t i = 0; i < static_cast(height); ++i) { + for (size_t j = 0; j < static_cast(size); ++j) { if (i == 0) { out_buf[j] = in_buf[i * size + j]; } else {