From dd27996c3b597e32a1a60e4b6c7cad8f3279c71b Mon Sep 17 00:00:00 2001 From: sneaxiy <32832641+sneaxiy@users.noreply.github.com> Date: Thu, 24 Nov 2022 09:43:36 +0800 Subject: [PATCH] fix adam thread num (#48297) --- paddle/phi/kernels/gpu/adam_kernel.cu | 4 ++-- paddle/phi/kernels/gpu/adamw_kernel.cu | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/phi/kernels/gpu/adam_kernel.cu b/paddle/phi/kernels/gpu/adam_kernel.cu index 0597311e219..c4c9ff9e06c 100644 --- a/paddle/phi/kernels/gpu/adam_kernel.cu +++ b/paddle/phi/kernels/gpu/adam_kernel.cu @@ -253,7 +253,7 @@ void AdamDenseKernel(const Context& dev_ctx, param.numel()); if (!use_global_beta_pow) { // Update with gpu - UpdateBetaPow<<<1, 32, 0, dev_ctx.stream()>>>( + UpdateBetaPow<<<1, 1, 0, dev_ctx.stream()>>>( beta1_, beta2_, beta1_pow.data(), @@ -352,7 +352,7 @@ void MergedAdamKernel( param[idx]->numel()); if (!use_global_beta_pow) { // Update with gpu - UpdateBetaPow<<<1, 32, 0, dev_ctx.stream()>>>( + UpdateBetaPow<<<1, 1, 0, dev_ctx.stream()>>>( beta1_, beta2_, beta1_pow[idx]->data(), diff --git a/paddle/phi/kernels/gpu/adamw_kernel.cu b/paddle/phi/kernels/gpu/adamw_kernel.cu index 6994c83f536..2252deb1da2 100644 --- a/paddle/phi/kernels/gpu/adamw_kernel.cu +++ b/paddle/phi/kernels/gpu/adamw_kernel.cu @@ -282,7 +282,7 @@ void AdamwDenseKernel(const Context& dev_ctx, param.numel()); if (!use_global_beta_pow) { // Update with gpu - UpdateAdamWBetaPow<<<1, 32, 0, dev_ctx.stream()>>>( + UpdateAdamWBetaPow<<<1, 1, 0, dev_ctx.stream()>>>( beta1_, beta2_, beta1_pow.data(), -- GitLab