lightseq
lightseq copied to clipboard
Question about beam search.
Here is the code in step 3 of select_beam_rough_topk().
The idx equals to left_idx. Which equals to block_start + threadIdx.x. Then it can not cover all the index in vocab_size. And the variable iter in this loop is not used in loop body. How could this loop select all the candidates token with logits bigger than s_topk.
idx will change at each loop's end。
https://github.com/bytedance/lightseq/blob/a5844a287f08f3190438b2bfbab15bf5c0eb525d/lightseq/inference/kernels/transformerKernels.cc.cu#L160