Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update method for locating cufile and remove unused libcudf cmake options #2594

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,13 @@
<arg value="-DCMAKE_CUDA_ARCHITECTURES=${GPU_ARCHS}"/>
<arg value="-DCMAKE_INSTALL_PREFIX=${libcudf.install.path}"/>
<arg value="-DCUDF_DEPENDENCY_PIN_MODE=${libcudf.dependency.mode}"/>
<arg value="-DCUDA_STATIC_CUFILE=ON"/>
<arg value="-DCUDA_STATIC_RUNTIME=ON"/>
<arg value="-DCUDF_ENABLE_ARROW_S3=OFF"/>
<arg value="-DCUDF_ENABLE_ARROW_PARQUET=ON"/>
revans2 marked this conversation as resolved.
Show resolved Hide resolved
<arg value="-DCUDF_USE_ARROW_STATIC=ON"/>
<arg value="-DCUDF_USE_PER_THREAD_DEFAULT_STREAM=${CUDF_USE_PER_THREAD_DEFAULT_STREAM}" />
<arg value="-DCUDF_LARGE_STRINGS_DISABLED=ON"/>
<arg value="-DCUDF_KVIKIO_REMOTE_IO=OFF"/>
<arg value="-DLIBCUDF_LOGGING_LEVEL=${RMM_LOGGING_LEVEL}" />
<arg value="-DRMM_LOGGING_LEVEL=${RMM_LOGGING_LEVEL}" />
<arg value="-DUSE_GDS=${USE_GDS}" />
<arg value="-C=${cudf.pin.path}/setup.cmake"/>
</exec>
<exec dir="${libcudf.build.path}"
Expand Down Expand Up @@ -496,6 +493,7 @@
<env key="CUDF_ROOT" value="${cudf.path}"/>
<arg value="${cudf.path}/java/src/main/native"/>
<arg value="-DBUILD_SHARED_LIBS=OFF"/>
<arg value="-DCUDA_STATIC_CUFILE=ON"/>
<arg value="-DCUDA_STATIC_RUNTIME=ON"/>
<arg value="-DCUDF_JNI_LIBCUDF_STATIC=ON"/>
<arg value="-DGPU_ARCHS=${GPU_ARCHS}"/>
Expand Down
12 changes: 9 additions & 3 deletions src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# the License.
# =============================================================================

cmake_minimum_required(VERSION 3.20.1 FATAL_ERROR)
cmake_minimum_required(VERSION 3.28.6 FATAL_ERROR)

set(CUDF_DIR
"$ENV{CUDF_ROOT}"
Expand Down Expand Up @@ -98,6 +98,7 @@ set_property(
message(VERBOSE "SPARK_RAPIDS_JNI: RMM_LOGGING_LEVEL = '${RMM_LOGGING_LEVEL}'.")

set(CMAKE_PREFIX_PATH ${CUDF_INSTALL_DIR})
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

# Set a default build type if none was specified
rapids_cmake_build_type("Release")
Expand Down Expand Up @@ -297,7 +298,6 @@ add_dependencies(cudfjnistub spark_rapids_jni)
# * cuFile JNI -------------------------------------------------------------------------------------

if(USE_GDS)
include(${CUDF_DIR}/cpp/cmake/Modules/FindcuFile.cmake)
find_library(CUFILEJNI_LIB "libcufilejni.a" REQUIRED NO_DEFAULT_PATH
HINTS "${CUDFJNI_BUILD_DIR}"
)
Expand All @@ -309,14 +309,20 @@ if(USE_GDS)
# set target compile options
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS ON
CUDA_STANDARD 17
CUDA_STANDARD_REQUIRED ON
POSITION_INDEPENDENT_CODE ON
INTERFACE_POSITION_INDEPENDENT_CODE ON
CUDA_RUNTIME_LIBRARY Static
)
target_link_libraries(
cufilejni PRIVATE
-Wl,--whole-archive
${CUFILEJNI_LIB}
-Wl,--no-whole-archive
spark_rapids_jni
${cuFile_LIBRARIES}
CUDA::cuFile_static
)
rapids_cuda_set_runtime(cufilejni USE_STATIC ON)
endif()
Expand Down
Loading