From a1d3ec4b36922420859430796e70c6b90ba1ed9b Mon Sep 17 00:00:00 2001 From: arai713 <67439843+arai713@users.noreply.github.com> Date: Fri, 4 Oct 2024 10:51:50 -0700 Subject: [PATCH] Codegen build (#1526) * updating codegen build for MIOpen access: adding .cmake for codegen component (cherry picked from commit 652a7c046381526947f507a89299aa92d89dbd02) * updating CMake (cherry picked from commit a685822e361045f3ef02a2f60c1c0eadd9cc4c85) [ROCm/composable_kernel commit: b545de175a7a1410baaea70f1f32ecb819e1d056] --- CMakeLists.txt | 4 +++- cmake/Embed.cmake | 4 +++- codegen/CMakeLists.txt | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd321f7722..dc73b5f4d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -569,7 +569,9 @@ if(NOT DEFINED INSTANCES_ONLY) PACKAGE_NAME examples ) add_subdirectory(example) - add_subdirectory(test) + if(BUILD_TESTING) + add_subdirectory(test) + endif() rocm_package_setup_component(profiler LIBRARY_NAME composablekernel diff --git a/cmake/Embed.cmake b/cmake/Embed.cmake index 4bc638b446..3946cf4e8d 100644 --- a/cmake/Embed.cmake +++ b/cmake/Embed.cmake @@ -233,6 +233,8 @@ function(add_embed_library EMBED_NAME) else() target_sources(${EMBED_NAME} INTERFACE $) endif() - target_include_directories(${EMBED_NAME} INTERFACE "${EMBED_DIR}/include") + target_include_directories(${EMBED_NAME} INTERFACE + $ + $) endfunction() diff --git a/codegen/CMakeLists.txt b/codegen/CMakeLists.txt index 3b3e9f06ee..2492804f28 100644 --- a/codegen/CMakeLists.txt +++ b/codegen/CMakeLists.txt @@ -39,6 +39,7 @@ set_target_properties(ck_host PROPERTIES target_include_directories(ck_host PUBLIC $ + $ ) add_executable(ck-template-driver driver/main.cpp) @@ -48,6 +49,12 @@ rocm_install( TARGETS ck_host ck_headers EXPORT ck_hostTargets ) +rocm_install(EXPORT ck_hostTargets + FILE composable_kernelck_hostTargets.cmake + NAMESPACE composable_kernel:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/composable_kernel) rocm_install(DIRECTORY include/ck DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -add_subdirectory(test) +if(BUILD_TESTING) + add_subdirectory(test) +endif()