Skip to content

Commit

Permalink
[Fix](bangc-ops):ms_deform_attn_backward memcheck warning fix. (Cambr…
Browse files Browse the repository at this point in the history
  • Loading branch information
mahxn0 authored Jun 30, 2023
1 parent 84c68ed commit 773a2da
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void __mlu_func__ loadValue(
__bang_cycle_add(grad_temp1, grad_temp1, mask2, deal_num_real * num_deal_grid,
num_deal_grid);
__bang_transpose(grad_temp3, grad_temp1, deal_num_real, num_deal_grid);
__nram__ int32_t table[2] = {0, (int32_t)0xffffffff};
__nram__ int32_t table[64] = {0, (int32_t)0xffffffff};
__bang_float2int32((int32_t *)grad_temp3, grad_temp3,
num_deal_grid * deal_num_real, 0);
__bang_lut_s32((int32_t *)grad_temp3, (int32_t *)grad_temp3, (int32_t *)table,
Expand Down Expand Up @@ -688,7 +688,7 @@ void __mlu_func__ computeGradAttnWeight(

__bang_float2int32((int32_t *)nram_h_high_temp, nram_h_high_temp,
num_deal_grid, 0);
__nram__ int32_t table[2] = {0, (int32_t)0xffffffff};
__nram__ int32_t table[64] = {0, (int32_t)0xffffffff};
__bang_lut_s32((int32_t *)nram_h_high_temp, (int32_t *)nram_h_high_temp,
(int32_t *)table, num_deal_grid, 64);
__bang_band((char *)nram_grad_output_tr, (char *)nram_grad_output_tr,
Expand Down Expand Up @@ -744,7 +744,7 @@ void __mlu_func__ computeGradSampingLoc(
__mluop_recursive_sum_pool(grad_h_weight, num_deal_grid, deal_num_real,
ALIGN_NUM);

__nram__ int32_t table[2] = {0, (int32_t)0xffffffff};
__nram__ int32_t table[64] = {0, (int32_t)0xffffffff};
__bang_lut_s32((int32_t *)nram_h_high_temp, (int32_t *)nram_h_high_temp,
(int32_t *)table, num_deal_grid, 64);
__bang_band((char *)grad_h_weight, (char *)grad_h_weight,
Expand Down

0 comments on commit 773a2da

Please sign in to comment.