From 95fa383df2919ce16e05672b5b632aa522422d97 Mon Sep 17 00:00:00 2001 From: donproc Date: Wed, 22 Jul 2020 11:02:40 +0800 Subject: [PATCH] optimize embedding cuda kernel lookup_table_v2,test=develop (#25587) --- paddle/fluid/operators/lookup_table_v2_op.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/lookup_table_v2_op.cu b/paddle/fluid/operators/lookup_table_v2_op.cu index 5c98eab403..b3b0f8f196 100644 --- a/paddle/fluid/operators/lookup_table_v2_op.cu +++ b/paddle/fluid/operators/lookup_table_v2_op.cu @@ -105,17 +105,17 @@ class LookupTableV2CUDAKernel : public framework::OpKernel { auto *table = table_t->data(); auto *output = output_t->mutable_data(context.GetPlace()); - dim3 threads(128, 8); - dim3 grids(8, 1); + dim3 threads(256, 4); + dim3 grids(80, 1); if (padding_idx == -1) LookupTableV2< - T, 128, 8, 8, + T, 256, 4, 80, false><<>>( output, table, ids, N, K, D, padding_idx); else LookupTableV2< - T, 128, 8, 8, + T, 256, 4, 80, true><<>>( output, table, ids, N, K, D, padding_idx); } -- GitLab