Skip to content

Commit 16dce9c

Browse files
committed
AMREX_GPU_MAX_THREADS: 256 -> 128
1 parent 86c1fe2 commit 16dce9c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Docs/sphinx_documentation/source/GPU.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ Building with CMake
229229

230230
To build AMReX with GPU support in CMake, add
231231
``-DAMReX_GPU_BACKEND=CUDA|HIP|SYCL`` to the ``cmake`` invocation, for CUDA,
232-
HIP and SYCL, respectively. By default, AMReX uses 256 threads per GPU
232+
HIP and SYCL, respectively. By default, AMReX uses 128 threads per GPU
233233
block/group in most situations. This can be changed with
234-
``-DAMReX_GPU_MAX_THREADS=N``, where ``N`` is 128 for example.
234+
``-DAMReX_GPU_MAX_THREADS=N``, where ``N`` is 256 for example.
235235

236236
Enabling CUDA support
237237
^^^^^^^^^^^^^^^^^^^^^
@@ -1166,7 +1166,7 @@ GPU block size
11661166

11671167
By default, :cpp:`ParallelFor` launches ``AMREX_GPU_MAX_THREADS`` threads
11681168
per GPU block, where ``AMREX_GPU_MAX_THREADS`` is a compile-time constant
1169-
with a default value of 256. The users can also explicitly specify the
1169+
with a default value of 128. The users can also explicitly specify the
11701170
number of threads per block by :cpp:`ParallelFor<MY_BLOCK_SIZE>(...)`, where
11711171
``MY_BLOCK_SIZE`` is a multiple of the warp size (e.g., 128). This allows
11721172
the users to do performance tuning for individual kernels.

Tools/CMake/AMReXOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ if (NOT AMReX_GPU_BACKEND STREQUAL NONE)
133133
message( STATUS " AMReX_GPU_BACKEND = ${AMReX_GPU_BACKEND}")
134134

135135
# We might set different default for different GPUs in the future.
136-
set(AMReX_GPU_MAX_THREADS_DEFAULT "256")
136+
set(AMReX_GPU_MAX_THREADS_DEFAULT "128")
137137
set(AMReX_GPU_MAX_THREADS ${AMReX_GPU_MAX_THREADS_DEFAULT} CACHE STRING
138138
"Maximum number of GPU threads per block" )
139139
message( STATUS " AMReX_GPU_MAX_THREADS = ${AMReX_GPU_MAX_THREADS}")

Tools/GNUMake/Make.defs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ else
269269
endif
270270

271271
# Maximum number of GPU threads per block.
272-
CUDA_MAX_THREADS ?= 256
272+
CUDA_MAX_THREADS ?= 128
273273
GPU_MAX_THREADS ?= $(CUDA_MAX_THREADS)
274274

275275
ifeq ($(USE_CUDA),TRUE)

0 commit comments

Comments
 (0)