From ccccf70aa204eb1809e162c9203d4deaed139016 Mon Sep 17 00:00:00 2001 From: Liam Adams Date: Wed, 13 Nov 2024 22:09:33 +0000 Subject: [PATCH] Find and link to hipsparse and cusparse. --- hic/CMakeLists.txt | 1 + hic/src/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hic/CMakeLists.txt b/hic/CMakeLists.txt index 904f7a077..a2f54ebb9 100644 --- a/hic/CMakeLists.txt +++ b/hic/CMakeLists.txt @@ -35,6 +35,7 @@ if( HAVE_CUDA ) find_package(CUDAToolkit REQUIRED) elseif( HAVE_HIP ) find_package(hip CONFIG REQUIRED) + find_package(hipsparse CONFIG REQUIRED) endif() add_subdirectory( src ) diff --git a/hic/src/CMakeLists.txt b/hic/src/CMakeLists.txt index 82f94ee4c..41a25c882 100644 --- a/hic/src/CMakeLists.txt +++ b/hic/src/CMakeLists.txt @@ -36,6 +36,8 @@ install( FILES hic/hic_dummy/hic_dummy_runtime.h DESTINATION include/hi if( HAVE_CUDA ) target_link_libraries( hic INTERFACE CUDA::cudart ) + target_link_libraries( hic INTERFACE CUDA::cusparse ) elseif( HAVE_HIP ) target_link_libraries( hic INTERFACE hip::host ) + target_link_libraries( hic INTERFACE roc::hipsparse ) endif()