mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
enable dcu ci (#3402)
This commit is contained in:
@@ -46,7 +46,11 @@ __global__ void GetPaddingOffsetKernel(int *batch_id_per_token,
|
||||
const int ti = threadIdx.x;
|
||||
int cum_offset = bi == 0 ? 0 : cum_offsets[bi - 1];
|
||||
for (int i = ti; i < seq_lens[bi]; i += blockDim.x) {
|
||||
#ifdef PADDLE_WITH_HIP
|
||||
batch_id_per_token[bi * max_seq_len - cum_offset + i] = cum_offset;
|
||||
#else
|
||||
batch_id_per_token[bi * max_seq_len - cum_offset + i] = bi;
|
||||
#endif
|
||||
}
|
||||
if (ti == 0) {
|
||||
cum_offsets_out[bi] = cum_offset;
|
||||
|
||||
Reference in New Issue
Block a user