Skip to content

Commit

Permalink
Replace FindcuFile with upstream FindCUDAToolkit support (rapidsai#17298
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.

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Karthikeyan (https://github.com/karthikeyann)
  - Yunsong Wang (https://github.com/PointKernel)
  - Muhammad Haseeb (https://github.com/mhaseeb123)

URL: rapidsai#17298
  • Loading branch information
KyleFromNVIDIA authored Nov 13, 2024
1 parent c4a4a91 commit 6acd33d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 161 deletions.
12 changes: 6 additions & 6 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,6 @@ if(CUDF_BUILD_TESTUTIL)
endif()
# preprocess jitify-able kernels
include(cmake/Modules/JitifyPreprocessKernels.cmake)
# find cuFile
include(cmake/thirdparty/get_cufile.cmake)
# find KvikIO
include(cmake/thirdparty/get_kvikio.cmake)
# find fmt
Expand All @@ -302,9 +300,6 @@ if(NOT BUILD_SHARED_LIBS)
include("${rapids-cmake-dir}/export/find_package_file.cmake")
list(APPEND METADATA_KINDS BUILD INSTALL)
list(APPEND dependencies KvikIO ZLIB nvcomp nanoarrow)
if(TARGET cufile::cuFile_interface)
list(APPEND dependencies cuFile)
endif()

foreach(METADATA_KIND IN LISTS METADATA_KINDS)
foreach(dep IN LISTS dependencies)
Expand Down Expand Up @@ -903,6 +898,11 @@ target_compile_definitions(cudf PUBLIC "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${LIBCU
# Enable remote IO through KvikIO
target_compile_definitions(cudf PRIVATE $<$<BOOL:${CUDF_KVIKIO_REMOTE_IO}>:CUDF_KVIKIO_REMOTE_IO>)

# Enable cuFile support
if(TARGET CUDA::cuFile)
target_compile_definitions(cudf PRIVATE CUDF_CUFILE_FOUND)
endif()

# Compile stringified JIT sources first
add_dependencies(cudf jitify_preprocess_run)

Expand All @@ -911,7 +911,7 @@ target_link_libraries(
cudf
PUBLIC CCCL::CCCL rmm::rmm $<BUILD_LOCAL_INTERFACE:BS::thread_pool> spdlog::spdlog_header_only
PRIVATE $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp> cuco::cuco ZLIB::ZLIB nvcomp::nvcomp
kvikio::kvikio $<TARGET_NAME_IF_EXISTS:cuFile_interface> nanoarrow
kvikio::kvikio $<TARGET_NAME_IF_EXISTS:CUDA::cuFile> nanoarrow
)

# Add Conda library, and include paths if specified
Expand Down
120 changes: 0 additions & 120 deletions cpp/cmake/Modules/FindcuFile.cmake

This file was deleted.

32 changes: 0 additions & 32 deletions cpp/cmake/thirdparty/get_cufile.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cpp/src/io/utilities/file_io_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ file_wrapper::file_wrapper(std::string const& filepath, int flags, mode_t mode)

file_wrapper::~file_wrapper() { close(fd); }

#ifdef CUFILE_FOUND
#ifdef CUDF_CUFILE_FOUND

/**
* @brief Class that dynamically loads the cuFile library and manages the cuFile driver.
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/io/utilities/file_io_utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#ifdef CUFILE_FOUND
#ifdef CUDF_CUFILE_FOUND
#include <cudf_test/file_utilities.hpp>

#include <BS_thread_pool.hpp>
Expand Down Expand Up @@ -97,7 +97,7 @@ class cufile_output {
virtual std::future<void> write_async(void const* data, size_t offset, size_t size) = 0;
};

#ifdef CUFILE_FOUND
#ifdef CUDF_CUFILE_FOUND

class cufile_shim;

Expand Down

0 comments on commit 6acd33d

Please sign in to comment.