From 95211f7b921138f5a415c525aa841467202340f9 Mon Sep 17 00:00:00 2001 From: mahxn0 <1262384588@qq.com> Date: Thu, 28 Nov 2024 11:43:25 +0800 Subject: [PATCH] [Fix](mluOpGenerateProposalsV2): fix memcheck bug. --- .../generate_proposals_v2/generate_proposals_v2_nms_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernels/generate_proposals_v2/generate_proposals_v2_nms_utils.h b/kernels/generate_proposals_v2/generate_proposals_v2_nms_utils.h index fadcacbff..5e4d467f5 100644 --- a/kernels/generate_proposals_v2/generate_proposals_v2_nms_utils.h +++ b/kernels/generate_proposals_v2/generate_proposals_v2_nms_utils.h @@ -329,9 +329,9 @@ __mlu_func__ void nonMaximumSuppress( int core_num = 0; int nram_save_count = 0; - limit = - (MAX_NRAM_SIZE - NFU_ALIGN_SIZE - nram_save_limit_count * sizeof(T) * 5) / - memory_block; + limit = (MAX_NRAM_SIZE - NFU_ALIGN_SIZE * sizeof(T) - + nram_save_limit_count * sizeof(T) * 5) / + memory_block; getComputeParams(scores_num, limit, memory_block, sizeof(T), &max_seg_num, &repeat, &remain_num, &core_num, &core_offset); // init nram ptr