Skip to content

Commit

Permalink
fix the logic of enabling XDL and WMMA instances (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
illsilin authored Oct 23, 2024
1 parent cedccd5 commit 8e22e1a
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,14 @@ rocm_check_target_ids(SUPPORTED_GPU_TARGETS

message("Building CK for the following targets: ${SUPPORTED_GPU_TARGETS}")

if (GPU_TARGETS)
if (GPU_TARGETS MATCHES "gfx9")
add_definitions(-DCK_USE_XDL)
set(CK_USE_XDL "ON")
endif()
if (GPU_TARGETS MATCHES "gfx11" OR GPU_TARGETS MATCHES "gfx12")
add_definitions(-DCK_USE_WMMA)
set(CK_USE_WMMA "ON")
endif()
else()
add_definitions(-DCK_USE_WMMA -DCK_USE_XDL)
if (SUPPORTED_GPU_TARGETS MATCHES "gfx9")
message("Enabling XDL instances")
add_definitions(-DCK_USE_XDL)
set(CK_USE_XDL "ON")
endif()
if (SUPPORTED_GPU_TARGETS MATCHES "gfx11" OR SUPPORTED_GPU_TARGETS MATCHES "gfx12")
message("Enabling WMMA instances")
add_definitions(-DCK_USE_WMMA)
set(CK_USE_WMMA "ON")
endif()

Expand Down Expand Up @@ -578,7 +574,7 @@ rocm_package_setup_component(profiler
)
add_subdirectory(profiler)

if(CK_USE_CODEGEN AND (GPU_TARGETS MATCHES "gfx9" OR GPU_ARCHS))
if(CK_USE_CODEGEN AND (SUPPORTED_GPU_TARGETS MATCHES "gfx9" OR GPU_ARCHS))
add_subdirectory(codegen)
endif()

Expand Down

0 comments on commit 8e22e1a

Please sign in to comment.