From a1c96508625be7f9ffe26d02064211bd958092bf Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Tue, 23 Apr 2019 17:35:35 +0000 Subject: [PATCH] Reduce chunk_size used in CUDA kernels from 8 to 1 --- doc/news/changes/minor/20190423BrunoTurcksin | 4 ++++ include/deal.II/base/cuda_size.h | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 doc/news/changes/minor/20190423BrunoTurcksin diff --git a/doc/news/changes/minor/20190423BrunoTurcksin b/doc/news/changes/minor/20190423BrunoTurcksin new file mode 100644 index 0000000000..3a3c21db18 --- /dev/null +++ b/doc/news/changes/minor/20190423BrunoTurcksin @@ -0,0 +1,4 @@ +Changed: The chunk_size used in CUDA kernels has been reduced from 8 to 1 to +improve performance on newer architectures. +
+(Bruno Turcksin, 2019/04/23) diff --git a/include/deal.II/base/cuda_size.h b/include/deal.II/base/cuda_size.h index 26e0a3c4d9..274b418f9a 100644 --- a/include/deal.II/base/cuda_size.h +++ b/include/deal.II/base/cuda_size.h @@ -23,14 +23,16 @@ DEAL_II_NAMESPACE_OPEN namespace CUDAWrappers { /** - * Define the size of a block when launching a CUDA kernel. + * Define the size of a block when launching a CUDA kernel. This number can be + * changed depending on the architecture the code is running on. */ constexpr int block_size = 512; /** - * Define the size of chunk of data worked on by a thread. + * Define the size of chunk of data worked on by a thread. This number can be + * changed depending on the architecture the code is running on. */ - constexpr int chunk_size = 8; + constexpr int chunk_size = 1; } // namespace CUDAWrappers DEAL_II_NAMESPACE_CLOSE -- 2.39.5