Changes to allow MIOpen to build CK as part of its build. (#2247)

* tweaks to the miopen specific build.  add way to skip clang-tidy checks and a way to skip some custom build targets MIOpen also has.

* move the tidy if statment

---------

Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>

[ROCm/composable_kernel commit: 6df1c56ad6]
This commit is contained in:
Adam Dickin
2025-05-28 14:51:15 -06:00
committed by GitHub
parent e12b6b41d5
commit d9e29b81a7
2 changed files with 161 additions and 148 deletions

View File

@@ -104,17 +104,6 @@ function(add_instance_library INSTANCE_NAME)
endif()
endforeach()
if(MIOPEN_REQ_LIBS_ONLY)
message("Removing all sources that are not required for MIOpen")
foreach(source IN LISTS ARGN)
if(source MATCHES "gemm" OR
source MATCHES "mha" OR
source MATCHES "contraction" OR
source MATCHES "reduce")
list(REMOVE_ITEM ARGN "${source}")
endif()
endforeach()
endif()
#message("remaining instances: ${ARGN}")
#only continue if there are some source files left on the list
if(ARGN)
@@ -294,6 +283,17 @@ FOREACH(subdir_path ${dir_list})
message("Found gemm_multiply_multiply_f8 instances, but gfx94/gfx95 not on the target list. Skipping.")
set(add_inst 0)
endif()
if(MIOPEN_REQ_LIBS_ONLY)
message("Removing all sources that are not required for MIOpen")
if("${cmake_instance}" MATCHES "gemm" OR
"${cmake_instance}" MATCHES "mha" OR
"${cmake_instance}" MATCHES "contraction" OR
"${cmake_instance}" MATCHES "reduce")
set(add_inst 0)
endif()
endif()
if((add_inst EQUAL 1))
get_filename_component(target_dir ${subdir_path} NAME)
add_subdirectory(${target_dir})