@@ -109,15 +109,15 @@ void conv2d_impl(
109109 ssize_t in_y = stride_y * out_y + dilation_y * w_y - padding_y;
110110 in_coord[2 ] = in_y;
111111 // Only proceed if input y coordinate is within bounds
112- if (in_y >= 0 && in_y < in_H) {
112+ if (in_y >= 0 && in_y < static_cast < ssize_t >( in_H) ) {
113113 for (const auto w_x : c10::irange (w_W)) {
114114 w_coord[3 ] = w_x;
115115
116116 ssize_t in_x = stride_x * out_x + dilation_x * w_x - padding_x;
117117 in_coord[3 ] = in_x;
118118
119119 // Only proceed if input x coordinate is within bounds
120- if (in_x >= 0 && in_x < in_W) {
120+ if (in_x >= 0 && in_x < static_cast < ssize_t >( in_W) ) {
121121 size_t in_idx =
122122 calculate_linear_index (in_coord, in_strides.data (), 4 );
123123 CTYPE in_val = in_ptr[in_idx];
@@ -165,14 +165,14 @@ void conv2d_impl(
165165 out_coord[2 ] = out_y;
166166
167167 // Only proceed if output y coordinate is within bounds
168- if (out_y >= 0 && out_y < out_H) {
168+ if (out_y >= 0 && out_y < static_cast < ssize_t >( out_H) ) {
169169 for (const auto w_x : c10::irange (w_W)) {
170170 w_coord[3 ] = w_x;
171171 ssize_t out_x = stride_x * in_x + dilation_x * w_x - padding_x;
172172 out_coord[3 ] = out_x;
173173
174174 // Only proceed if output x coordinate is within bounds
175- if (out_x >= 0 && out_x < out_W) {
175+ if (out_x >= 0 && out_x < static_cast < ssize_t >( out_W) ) {
176176 size_t w_idx =
177177 calculate_linear_index (w_coord, w_strides.data (), 4 );
178178 CTYPE w_val = w_ptr[w_idx];
0 commit comments