From 5329187df1a0cd9d40aab2d4e3810f0c8fa47bf2 Mon Sep 17 00:00:00 2001 From: xiongkun Date: Thu, 17 Nov 2022 16:03:58 +0800 Subject: [PATCH] fix the thread number to ensure deterministic of embedding kernel (#48073) --- paddle/phi/kernels/gpu/embedding_grad_kernel.cu | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu index 0cfe2e43d1..8bb00f0759 100644 --- a/paddle/phi/kernels/gpu/embedding_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/embedding_grad_kernel.cu @@ -107,6 +107,7 @@ struct EmbeddingGradCUDAFunctor { if (FLAGS_cudnn_deterministic) { VLOG(2) << "Run grad kernel of embedding with single thread."; grids.x = 1; + threads.y = 1; } EmbeddingGrad<<>>( d_table, d_output, ids, N, K, D); -- GitLab