Skip to content

Commit

Permalink
[cmake] fix Mi300 architecture number. Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Taillefumier authored and oschuett committed Nov 7, 2024
1 parent 4d95af2 commit b5a5e3a
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ if((CP2K_USE_ACCEL MATCHES CUDA) OR (CP2K_USE_ACCEL MATCHES HIP))
set(CP2K_GPU_ARCH_NUMBER_Mi100 gfx908)
set(CP2K_GPU_ARCH_NUMBER_Mi200 gfx90a)
set(CP2K_GPU_ARCH_NUMBER_Mi250 gfx90a)
set(CP2K_GPU_ARCH_NUMBER_Mi300 gfx1103)
set(CP2K_GPU_ARCH_NUMBER_Mi300 gfx942)
endif()

set(CP2K_USE_HIP OFF)
Expand Down Expand Up @@ -580,7 +580,7 @@ elseif(CP2K_USE_ACCEL MATCHES "HIP")
set(CP2K_USE_HIP ON)

# use hardware atomic operations on Mi250X.
if(CMAKE_HIP_ARCGITECTURES MATCHES "gfx90a|gfx1103")
if(CMAKE_HIP_ARCGITECTURES MATCHES "gfx90a|gfx942")
set(HIP_RELEASE_OPTIONS "-munsafe-fp-atomics")
endif()

Expand All @@ -590,8 +590,8 @@ elseif(CP2K_USE_ACCEL MATCHES "HIP")
set(CMAKE_HIP_ARCHITECTURES "gfx90a:xnack+")
endif()

if(CMAKE_HIP_ARCHITECTURES MATCHES "gfx1103")
set(CMAKE_HIP_ARCHITECTURES "gfx1103:xnack+")
if(CMAKE_HIP_ARCHITECTURES MATCHES "gfx942")
set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+")
endif()
endif()
endif()
Expand Down Expand Up @@ -766,11 +766,6 @@ endif()
include(CompilerConfiguration)
include(CheckCompilerSupport)

if(CP2K_BUILD_DBCSR)
add_subdirectory(exts/dbcsr/src)
add_library(DBCSR::dbcsr ALIAS dbcsr)
endif()

include(GNUInstallDirs)

# subdirectories
Expand Down

0 comments on commit b5a5e3a

Please sign in to comment.