Skip to content

Commit

Permalink
Replace FindcuFile with upstream FindCUDAToolkit support
Browse files Browse the repository at this point in the history
CMake's FindCUDAToolkit has supported cuFile since 3.25. Use this
support and remove the custom FindcuFile module.
  • Loading branch information
KyleFromNVIDIA committed Nov 6, 2024
1 parent 130db96 commit ead08a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 132 deletions.
19 changes: 7 additions & 12 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,16 @@ if(KvikIO_REMOTE_SUPPORT)
include(cmake/thirdparty/get_libcurl.cmake)
endif()

if(KvikIO_CUDA_SUPPORT)
rapids_find_package(
CUDAToolkit REQUIRED
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
)
include(cmake/thirdparty/get_nvtx.cmake)
endif()

rapids_find_package(
cuFile
CUDAToolkit REQUIRED
BUILD_EXPORT_SET kvikio-exports
INSTALL_EXPORT_SET kvikio-exports
)

if(KvikIO_CUDA_SUPPORT)
include(cmake/thirdparty/get_nvtx.cmake)
endif()

if(NOT cuFile_FOUND)
message(
WARNING "Cannot find cuFile - KvikIO will still work but won't use GPUDirect Storage (GDS)"
Expand Down Expand Up @@ -136,8 +131,8 @@ target_link_libraries(
BS::thread_pool
${CMAKE_DL_LIBS}
$<TARGET_NAME_IF_EXISTS:nvtx3::nvtx3-cpp>
$<COMPILE_ONLY:$<TARGET_NAME_IF_EXISTS:CUDA::cudart>>
$<COMPILE_ONLY:$<TARGET_NAME_IF_EXISTS:cufile::cufile>>
$<COMPILE_ONLY:$<$<BOOL:${KvikIO_CUDA_SUPPORT}>:CUDA::cudart>>
$<COMPILE_ONLY:$<TARGET_NAME_IF_EXISTS:CUDA::cuFile>>
PRIVATE $<TARGET_NAME_IF_EXISTS:CURL::libcurl>
)

Expand Down
120 changes: 0 additions & 120 deletions cpp/cmake/Modules/FindcuFile.cmake

This file was deleted.

0 comments on commit ead08a1

Please sign in to comment.