Skip to content

Commit 7072869

Browse files
committed
fix step.cu
1 parent ab22757 commit 7072869

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

csrc/gpu/step.cu

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,13 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
5959
}
6060
} else if (seq_lens_decoder[tid] != 0 && block_table_now[seq_lens_decoder[tid] / block_size] == -1) {
6161
// 统计需要分配block的位置和总数
62-
#ifdef DEBUG_STEP
63-
printf("step seq_id:%d, ##### pin 1 #####\n", tid);
64-
#endif
6562
const int ori_need_block_len = atomicAdd(need_block_len, 1);
6663
need_block_list[ori_need_block_len] = tid;
6764
#ifdef DEBUG_STEP
6865
printf("seq_id: %d need block\n", tid);
6966
#endif
7067
}
7168
}
72-
#ifdef DEBUG_STEP
73-
printf("step seq_id:%d, ##### pin 2 #####\n", tid);
74-
#endif
7569
__syncthreads();
7670
if (tid == 0) {
7771
printf("need_block_len: %d, free_list_len: %d\n", need_block_len[0], free_list_len[0]);
@@ -108,9 +102,6 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
108102
}
109103
__syncthreads();
110104
}
111-
#ifdef DEBUG_STEP
112-
printf("step seq_id:%d, ##### pin 3 #####\n", tid);
113-
#endif
114105
// 为需要block的位置分配block,每个位置分配一个block
115106
if (tid < need_block_len[0]) {
116107
const int need_block_id = need_block_list[tid];
@@ -124,16 +115,10 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
124115
need_block_list[tid] = -1;
125116
}
126117
__syncthreads();
127-
#ifdef DEBUG_STEP
128-
printf("step seq_id:%d, ##### pin 4 #####\n", tid);
129-
#endif
130118
// 计算可以复原的query id
131119
if (tid == 0) {
132120
int ori_free_list_len = free_list_len[0];
133121
int ori_step_len = step_len[0];
134-
#ifdef DEBUG_STEP
135-
printf("ori_step_len %d\n", ori_step_len);
136-
#endif
137122
if (ori_step_len > 0) {
138123
int ori_step_block_id = step_block_list[ori_step_len - 1];
139124
int tmp_used_len = used_list_len[ori_step_block_id];
@@ -161,9 +146,6 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
161146
}
162147
need_block_len[0] = 0;
163148
}
164-
#ifdef DEBUG_STEP
165-
printf("step seq_id:%d, ##### pin 5 #####\n", tid);
166-
#endif
167149
}
168150

169151
// 根据上一步计算出的可以复原的query_id进行状态恢复

0 commit comments

Comments
 (0)