From d45a71daeea3ceb21b7a6080c274bbf689973f4d Mon Sep 17 00:00:00 2001 From: illsilin Date: Thu, 9 Nov 2023 22:12:39 -0800 Subject: [PATCH 1/2] use split CK libraries --- library/src/CMakeLists.txt | 2 +- library/src/contraction/CMakeLists.txt | 2 +- library/src/permutation/CMakeLists.txt | 2 +- samples/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/CMakeLists.txt b/library/src/CMakeLists.txt index 801d0761..6523184e 100644 --- a/library/src/CMakeLists.txt +++ b/library/src/CMakeLists.txt @@ -24,7 +24,7 @@ # ############################################################################### -find_package( composable_kernel 1.0.0 REQUIRED PATHS /opt/rocm /opt/rocm/ck $ENV{CK_DIR}/lib/cmake COMPONENTS device_operations ) +find_package( composable_kernel 1.0.0 REQUIRED PATHS /opt/rocm /opt/rocm/ck $ENV{CK_DIR}/lib/cmake COMPONENTS device_contraction_operations device_other_operations) rocm_package_add_dependencies("composable_kernel >= 1.0.0" COMPONENT tests) set(THREADS_PREFER_PTHREAD_FLAG ON) diff --git a/library/src/contraction/CMakeLists.txt b/library/src/contraction/CMakeLists.txt index cc518ab5..e487e43c 100644 --- a/library/src/contraction/CMakeLists.txt +++ b/library/src/contraction/CMakeLists.txt @@ -26,7 +26,7 @@ # Don't link to consume ck instances, however will customize and create our own. # Make the ck includes visible so we can build instances. -get_target_property(composable_kernel_INCLUDES composable_kernel::device_operations INTERFACE_INCLUDE_DIRECTORIES) +get_target_property(composable_kernel_INCLUDES composable_kernel::device_contraction_operations INTERFACE_INCLUDE_DIRECTORIES) set(HIPTENSOR_CONTRACTION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hiptensor_contraction.cpp diff --git a/library/src/permutation/CMakeLists.txt b/library/src/permutation/CMakeLists.txt index 3fe84a08..0c6c85f2 100644 --- a/library/src/permutation/CMakeLists.txt +++ b/library/src/permutation/CMakeLists.txt @@ -26,7 +26,7 @@ # Don't link to consume ck instances, however will customize and create our own. # Make the ck includes visible so we can build instances. -get_target_property(composable_kernel_INCLUDES composable_kernel::device_operations INTERFACE_INCLUDE_DIRECTORIES) +get_target_property(composable_kernel_INCLUDES composable_kernel::device_other_operations INTERFACE_INCLUDE_DIRECTORIES) set(HIPTENSOR_PERMUTATION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hiptensor_permutation.cpp diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 4914859b..d0e19935 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -68,7 +68,7 @@ else() add_compile_options(-std=c++17) # Requires linking installed composable kernel and hipTensor library - find_package(composable_kernel 1.0.0 REQUIRED PATHS /opt/rocm /opt/rocm/ck $ENV{CK_DIR}/lib/cmake COMPONENTS device_operations ) + find_package(composable_kernel 1.0.0 REQUIRED PATHS /opt/rocm /opt/rocm/ck $ENV{CK_DIR}/lib/cmake COMPONENTS device_contraction_operations device_other_operations) find_package(hiptensor 0.2.0 REQUIRED PATHS /opt/rocm /opt/rocm/hiptensor $ENV{HIPTENSOR_DIR}/lib/cmake COMPONENTS hiptensor) # This helps cmake properly find hip-config.cmake From af9a826aa6c1f5026cfec3612921652282e0bb88 Mon Sep 17 00:00:00 2001 From: illsilin Date: Fri, 10 Nov 2023 08:46:31 -0800 Subject: [PATCH 2/2] add the other library to contraction tests --- library/src/contraction/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/contraction/CMakeLists.txt b/library/src/contraction/CMakeLists.txt index e487e43c..cf407424 100644 --- a/library/src/contraction/CMakeLists.txt +++ b/library/src/contraction/CMakeLists.txt @@ -27,7 +27,7 @@ # Don't link to consume ck instances, however will customize and create our own. # Make the ck includes visible so we can build instances. get_target_property(composable_kernel_INCLUDES composable_kernel::device_contraction_operations INTERFACE_INCLUDE_DIRECTORIES) - +get_target_property(composable_kernel_INCLUDES composable_kernel::device_other_operations INTERFACE_INCLUDE_DIRECTORIES) set(HIPTENSOR_CONTRACTION_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/hiptensor_contraction.cpp ${CMAKE_CURRENT_SOURCE_DIR}/contraction_cpu_reference.cpp