From 0f4b6247c889bc38d4ea1302f831ae7f1dc8b980 Mon Sep 17 00:00:00 2001 From: wangchaochaohu Date: Mon, 2 Nov 2020 16:58:03 +0800 Subject: [PATCH] refine the gpu config for performance optimization (#28291) --- paddle/fluid/platform/gpu_launch_config.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/platform/gpu_launch_config.h b/paddle/fluid/platform/gpu_launch_config.h index d2d57995b72..3953abe142d 100755 --- a/paddle/fluid/platform/gpu_launch_config.h +++ b/paddle/fluid/platform/gpu_launch_config.h @@ -53,10 +53,8 @@ inline GpuLaunchConfig GetGpuLaunchConfig1D( // Need get from device const int thread_per_block = std::min(1024, context.GetMaxThreadsPerBlock()); - // Suppose block count small than factor * sm, factor is a experiments value. - int factor = 4; const int block_count = - std::min(DivUp(physical_thread_count, thread_per_block), factor * sm); + std::min(DivUp(physical_thread_count, thread_per_block), sm); GpuLaunchConfig config; config.theory_thread_count.x = theory_thread_count; -- GitLab