Skip to content

Commit 360cb18

Browse files
authored
fix bug in lookup table grad operator (#5228)
1 parent 9074a60 commit 360cb18

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
@@ -116,7 +116,7 @@ class LookupTableGradCUDAKernel : public framework::OpKernel<T> {
116116
auto* d_output_data = d_output->data<T>();
117117
PADDLE_ENFORCE_EQ(d_table_value->dims(), d_output->dims());
118118
memory::Copy(gpu_place, d_table_data, gpu_place, d_output_data,
119-
d_output->numel(), stream);
119+
d_output->numel() * sizeof(T), stream);
120120

121121
} else {
122122
auto ids_t = context.Input<LoDTensor>("Ids");

0 commit comments

Comments
 (0)