Skip to content

Commit

Permalink
[Fix](mluOpRotatedFeatureAlignForward): Fix memset warning (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
duzekunKTH authored Dec 2, 2024
1 parent 8b15238 commit 165417c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions kernels/rotated_feature_align/rotated_feature_align_block.mlu
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ __mlu_global__ void MLUKernelRotatedFeatureAlignForward(
const int channel_rem = channels % deal_num;
const int channel_loops = channels / deal_num + (channel_rem != 0 ? 1 : 0);
const int pixel_end = batches * height * width;
T px[5] = {0, 0, 0, 0, 0};
T py[5] = {0, 0, 0, 0, 0};
T px[5];
T py[5];
for (int i = 0; i < 5; ++i) {
px[i] = (T)0;
py[i] = (T)0;
}
int pixel_i = 0;
T *ping_out = NULL;
T *pong_out = NULL;
Expand Down Expand Up @@ -450,8 +454,12 @@ __mlu_global__ void MLUKernelRotatedFeatureAlignBackward(
const int channel_rem = channels % deal_num;
const int channel_loops = channels / deal_num + (channel_rem != 0 ? 1 : 0);
const int pixel_end = batches * height * width;
T px[5] = {0, 0, 0, 0, 0};
T py[5] = {0, 0, 0, 0, 0};
T px[5];
T py[5];
for (int i = 0; i < 5; ++i) {
px[i] = (T)0;
py[i] = (T)0;
}
int pixel_i = 0;
T *ping_out = NULL;
T *pong_out = NULL;
Expand Down

0 comments on commit 165417c

Please sign in to comment.