From a4d6101e99f26971f0eb4103c75f941bbd9d966e Mon Sep 17 00:00:00 2001 From: Lauren Wrubleski Date: Thu, 10 Nov 2022 12:19:33 -0700 Subject: [PATCH] Add packages for examples and profiler (#502) * Add packages for example and profiler * correct TEST_NAME -> EXAMPLE_NAME [ROCm/composable_kernel commit: 37f2e91832b25ee907533ad63bded43fc7e4cba7] --- CMakeLists.txt | 10 ++++++++++ example/CMakeLists.txt | 2 ++ profiler/CMakeLists.txt | 2 ++ 3 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5655ba1791..f861e30203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,6 +262,16 @@ rocm_package_setup_component(tests PACKAGE_NAME tests # Prevent -static suffix on package name ) +rocm_package_setup_component(examples + LIBRARY_NAME composablekernel + PACKAGE_NAME examples +) + +rocm_package_setup_component(profiler + LIBRARY_NAME composablekernel + PACKAGE_NAME ckProfiler +) + add_subdirectory(library) add_subdirectory(example) add_subdirectory(test) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 32207ef3a6..1fdd2f6d14 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -12,6 +12,7 @@ function(add_example_executable EXAMPLE_NAME FILE_NAME) add_test(NAME ${EXAMPLE_NAME} COMMAND $ ${ARGN}) add_dependencies(examples ${EXAMPLE_NAME}) add_dependencies(check ${EXAMPLE_NAME}) + rocm_install(TARGETS ${EXAMPLE_NAME} COMPONENT examples) endfunction(add_example_executable EXAMPLE_NAME) function(add_example_executable_no_testing EXAMPLE_NAME FILE_NAME) @@ -19,6 +20,7 @@ function(add_example_executable_no_testing EXAMPLE_NAME FILE_NAME) add_executable(${EXAMPLE_NAME} ${FILE_NAME}) target_link_libraries(${EXAMPLE_NAME} PRIVATE utility) add_dependencies(examples ${EXAMPLE_NAME}) + rocm_install(TARGETS ${EXAMPLE_NAME} COMPONENT examples) endfunction(add_example_executable_no_testing EXAMPLE_NAME) # add all example subdir diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index af8113789a..9e1f6f5232 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -57,3 +57,5 @@ target_link_libraries(ckProfiler PRIVATE device_conv2d_fwd_bias_relu_add_instanc target_link_libraries(ckProfiler PRIVATE device_normalization_instance) target_link_libraries(ckProfiler PRIVATE device_softmax_instance) target_link_libraries(ckProfiler PRIVATE device_reduce_instance) + +rocm_install(TARGETS ckProfiler COMPONENT profiler)