Skip to content

Commit

Permalink
fix: wavefront_size for gfx11* (AMReX-Codes#4170)
Browse files Browse the repository at this point in the history
## Summary
GPUs with arch gfx11* were getting set to 64 and causing to fail. This
PR aims to fix that by including in the Make and CMake defs.

## Additional background
https://rocm.docs.amd.com/en/latest/reference/gpu-arch-specs.html
  • Loading branch information
matheus-mcosta authored Sep 28, 2024
1 parent cf67be5 commit 103d0e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tools/CMake/AMReXSetDefines.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ endif()
if (AMReX_HIP)
add_amrex_define( AMREX_USE_HIP NO_LEGACY )
add_amrex_define( NDEBUG ) # This address a bug that causes slow build times
if (${AMReX_AMD_ARCH} MATCHES "gfx10.*")
if (${AMReX_AMD_ARCH} MATCHES "gfx1[01].*")
add_amrex_define( AMREX_AMDGCN_WAVEFRONT_SIZE=32 NO_LEGACY )
else ()
add_amrex_define( AMREX_AMDGCN_WAVEFRONT_SIZE=64 NO_LEGACY )
Expand Down
4 changes: 2 additions & 2 deletions Tools/GNUMake/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,8 @@ else ifeq ($(USE_HIP),TRUE)
AMD_ARCH = $(AMREX_AMD_ARCH)
endif

# For AMD GPUs, the wavefront is 64 except for gfx10??.
ifeq ($(findstring gfx10,$(AMD_ARCH)),)
# For AMD GPUs, the wavefront is 64 except for gfx10?? and gfx11??.
ifeq ($(filter gfx10% gfx11%,$(AMD_ARCH)),)
DEFINES += -DAMREX_AMDGCN_WAVEFRONT_SIZE=64
else
DEFINES += -DAMREX_AMDGCN_WAVEFRONT_SIZE=32
Expand Down

0 comments on commit 103d0e9

Please sign in to comment.