Skip to content

Commit

Permalink
Add support for AMDGPU target NAVI31 / RX 7900 XT(X): gfx1100
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalk authored and dalg24 committed Mar 29, 2023
1 parent 8c3d97e commit e275a77
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Makefile.kokkos
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,11 @@ ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI")
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx1030
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NAVI1100), 1)
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI1100")
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_NAVI")
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx1100
endif


KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/HIP/*.cpp)
Expand Down
1 change: 1 addition & 0 deletions cmake/KokkosCore_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,4 @@
#cmakedefine KOKKOS_ARCH_VEGA90A
#cmakedefine KOKKOS_ARCH_NAVI
#cmakedefine KOKKOS_ARCH_NAVI1030
#cmakedefine KOKKOS_ARCH_NAVI1100
6 changes: 3 additions & 3 deletions cmake/kokkos_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ IF(Kokkos_ENABLE_HIP OR Kokkos_ENABLE_OPENMPTARGET)
ENDIF()

# AMD archs ordered in decreasing priority of autodetection
LIST(APPEND SUPPORTED_AMD_GPUS MI200 MI100 MI50/60 V620/W6800)
LIST(APPEND SUPPORTED_AMD_ARCHS VEGA90A VEGA908 VEGA906 NAVI1030)
LIST(APPEND CORRESPONDING_AMD_FLAGS gfx90a gfx908 gfx906 gfx1030)
LIST(APPEND SUPPORTED_AMD_GPUS MI200 MI100 MI50/60 RX7900XTX V620/W6800)
LIST(APPEND SUPPORTED_AMD_ARCHS VEGA90A VEGA908 VEGA906 NAVI1100 NAVI1030)
LIST(APPEND CORRESPONDING_AMD_FLAGS gfx90a gfx908 gfx906 gfx1100 gfx1030)

#FIXME CAN BE REPLACED WITH LIST_ZIP IN CMAKE 3.17
FOREACH(ARCH IN LISTS SUPPORTED_AMD_ARCHS)
Expand Down
3 changes: 3 additions & 0 deletions core/src/impl/Kokkos_Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,9 @@ void pre_initialize_internal(const Kokkos::InitializationSettings& settings) {
#elif defined(KOKKOS_ARCH_NAVI1030)
declare_configuration_metadata("architecture", "GPU architecture",
"NAVI1030");
#elif defined(KOKKOS_ARCH_NAVI1100)
declare_configuration_metadata("architecture", "GPU architecture",
"NAVI1100");

#else
declare_configuration_metadata("architecture", "GPU architecture", "none");
Expand Down
1 change: 1 addition & 0 deletions generate_makefile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ display_help_text() {
echo " VEGA908 = AMD GPU MI100 GFX908"
echo " VEGA90A = AMD GPU MI200 GFX90A"
echo " NAVI1030 = AMD GPU V620/W6800 GFX1030"
echo " NAVI1100 = AMD GPU RX 7900 XT(X) GFX1100"
echo " [ARM]"
echo " ARMV80 = ARMv8.0 Compatible CPU"
echo " ARMV81 = ARMv8.1 Compatible CPU"
Expand Down

0 comments on commit e275a77

Please sign in to comment.