Skip to content

Commit 048bc12

Browse files
committed
Fix GPU kernel of lookup_table_op enhancement
1 parent e54eaee commit 048bc12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/operators/lookup_table_op.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ __global__ void LookupTable(T* output, const T* table, const int64_t* ids,
3737
const T* tab = table + id * D;
3838
for (int i = idx; i < D; i += BlockDimX) {
3939
if (PaddingFlag) {
40-
if (idx == padding_idx)
40+
if (id == padding_idx)
4141
out[i] = static_cast<T>(0);
4242
else
4343
out[i] = tab[i];

0 commit comments

Comments
 (0)