@@ -59,19 +59,13 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
59
59
}
60
60
} else if (seq_lens_decoder[tid] != 0 && block_table_now[seq_lens_decoder[tid] / block_size] == -1 ) {
61
61
// 统计需要分配block的位置和总数
62
- #ifdef DEBUG_STEP
63
- printf (" step seq_id:%d, ##### pin 1 #####\n " , tid);
64
- #endif
65
62
const int ori_need_block_len = atomicAdd (need_block_len, 1 );
66
63
need_block_list[ori_need_block_len] = tid;
67
64
#ifdef DEBUG_STEP
68
65
printf (" seq_id: %d need block\n " , tid);
69
66
#endif
70
67
}
71
68
}
72
- #ifdef DEBUG_STEP
73
- printf (" step seq_id:%d, ##### pin 2 #####\n " , tid);
74
- #endif
75
69
__syncthreads ();
76
70
if (tid == 0 ) {
77
71
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,
108
102
}
109
103
__syncthreads ();
110
104
}
111
- #ifdef DEBUG_STEP
112
- printf (" step seq_id:%d, ##### pin 3 #####\n " , tid);
113
- #endif
114
105
// 为需要block的位置分配block,每个位置分配一个block
115
106
if (tid < need_block_len[0 ]) {
116
107
const int need_block_id = need_block_list[tid];
@@ -124,16 +115,10 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
124
115
need_block_list[tid] = -1 ;
125
116
}
126
117
__syncthreads ();
127
- #ifdef DEBUG_STEP
128
- printf (" step seq_id:%d, ##### pin 4 #####\n " , tid);
129
- #endif
130
118
// 计算可以复原的query id
131
119
if (tid == 0 ) {
132
120
int ori_free_list_len = free_list_len[0 ];
133
121
int ori_step_len = step_len[0 ];
134
- #ifdef DEBUG_STEP
135
- printf (" ori_step_len %d\n " , ori_step_len);
136
- #endif
137
122
if (ori_step_len > 0 ) {
138
123
int ori_step_block_id = step_block_list[ori_step_len - 1 ];
139
124
int tmp_used_len = used_list_len[ori_step_block_id];
@@ -161,9 +146,6 @@ __global__ void free_and_dispatch_block(bool *stop_flags,
161
146
}
162
147
need_block_len[0 ] = 0 ;
163
148
}
164
- #ifdef DEBUG_STEP
165
- printf (" step seq_id:%d, ##### pin 5 #####\n " , tid);
166
- #endif
167
149
}
168
150
169
151
// 根据上一步计算出的可以复原的query_id进行状态恢复
0 commit comments