Skip to content

Commit 04ee4da

Browse files
authored
Merge pull request #6937 from jacquesqiao/fix-math-warning
fix math_function warning
2 parents aa756a3 + 0f37602 commit 04ee4da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/operators/math/math_function_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class ColwiseSum<platform::CPUDeviceContext, T> {
9494
T* out_buf = out->mutable_data<T>(out->place());
9595
const T* in_buf = input.data<T>();
9696

97-
for (size_t i = 0; i < height; ++i) {
98-
for (size_t j = 0; j < size; ++j) {
97+
for (size_t i = 0; i < static_cast<size_t>(height); ++i) {
98+
for (size_t j = 0; j < static_cast<size_t>(size); ++j) {
9999
if (i == 0) {
100100
out_buf[j] = in_buf[i * size + j];
101101
} else {

0 commit comments

Comments
 (0)