Skip to content

Commit

Permalink
[Fix](mluOpRoiAlignRotatedForward): fix race_mem error
Browse files Browse the repository at this point in the history
  • Loading branch information
chqy99 committed Dec 12, 2024
1 parent 639cc78 commit 5de5321
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kernels/roi_align_rotated/roi_align_rotated_forward_vector.mlu
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ __mlu_global__ void roiAlignRotatedForward(
if (params.sample_ratio < bin_order_num) {
construct_order = false;
// construct bin_w_idx in bin_loop
__memcpy_async(bin_w_order, order, params.sample_ratio * sizeof(T),
NRAM2NRAM, params.sample_ratio * sizeof(T), 0,
params.sample_ratio - 1);
__memcpy(bin_w_order, order, params.sample_ratio * sizeof(T),
NRAM2NRAM, params.sample_ratio * sizeof(T), 0,
params.sample_ratio - 1);
// construct bin_h_idx in bin_loop
__bang_write_value(nram_w1, params.sample_ratio,
(uint8_t)params.sample_ratio);
Expand Down Expand Up @@ -449,9 +449,9 @@ __mlu_global__ void roiAlignRotatedForward(

if (construct_order) {
// construct bin_w_idx in bin_loop
__memcpy_async(bin_w_order, order, deal_bin_w * sizeof(T),
NRAM2NRAM, deal_bin_w * sizeof(T), 0,
deal_bin_h - 1);
__memcpy(bin_w_order, order, deal_bin_w * sizeof(T),
NRAM2NRAM, deal_bin_w * sizeof(T), 0,
deal_bin_h - 1);
// construct bin_h_idx in bin_loop
__bang_write_value(nram_w1, deal_bin_h, (uint8_t)deal_bin_w);
__extension(bin_h_order, order, (uint8_t *)nram_w1, sizeof(T),
Expand Down

0 comments on commit 5de5321

Please sign in to comment.