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

Fix CMake files in libcudf C++ examples to use existing libcudf build if present #15348

Merged
merged 30 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6401ef2
updates for libcudf examples cmake files
mhaseeb123 Mar 20, 2024
360d78a
Applying suggested fixes
mhaseeb123 Mar 20, 2024
24149bb
reverting CUDF_TAG to fetch_dependencies and handle in set_cuda_arch
mhaseeb123 Mar 22, 2024
90bd8b0
Adding CI artifacts to build and run libcudf examples
mhaseeb123 Mar 22, 2024
28ed85b
set cuda_architectures in each example
mhaseeb123 Apr 1, 2024
0f44faf
updates from cmake-format
mhaseeb123 Apr 8, 2024
aafd3be
add working directory variable to avoid mishandled sed
mhaseeb123 Apr 11, 2024
ee0100a
update file permissions for ci to run
mhaseeb123 Apr 12, 2024
8e5dfce
Merge branch 'rapidsai:branch-24.06' into cudf-examples-cmake-fix
mhaseeb123 Apr 16, 2024
9a65213
adding more CI artifacts for examples
mhaseeb123 Apr 16, 2024
51c89a2
Merge branch 'cudf-examples-cmake-fix' of https://github.com/mhaseeb1…
mhaseeb123 Apr 16, 2024
1370176
minor pre-commit fixes
mhaseeb123 Apr 16, 2024
bc00b9e
handle CMAKE_INSTALL_PREFIX in examples build
mhaseeb123 Apr 16, 2024
74aa66a
test CI with default CMAKE_INSTALL_PREFIX
mhaseeb123 Apr 16, 2024
80e705c
Merge branch 'cudf-examples-cmake-fix' of https://github.com/mhaseeb1…
mhaseeb123 Apr 16, 2024
0ac6f61
minor pre-commit fix
mhaseeb123 Apr 16, 2024
3e18bf3
revert custom install prefix and test CI.
mhaseeb123 Apr 16, 2024
fa3bf00
Use $PREFIX as CMAKE_INSTALL_PREFIX
mhaseeb123 Apr 16, 2024
1cbde69
minor fix for paths
mhaseeb123 Apr 16, 2024
a265da7
Merge branch 'branch-24.06' into cudf-examples-cmake-fix
mhaseeb123 Apr 16, 2024
9d8bf76
update install logic and fix for default behavior
mhaseeb123 Apr 16, 2024
f180fa7
Merge branch 'cudf-examples-cmake-fix' of https://github.com/mhaseeb1…
mhaseeb123 Apr 16, 2024
ad3f6a6
incorporting suggested changes from reviews
mhaseeb123 Apr 16, 2024
324e6dc
Merge branch 'branch-24.06' into cudf-examples-cmake-fix
mhaseeb123 Apr 16, 2024
00d1e2b
pre-commit eol
mhaseeb123 Apr 16, 2024
d767c49
Merge branch 'cudf-examples-cmake-fix' of https://github.com/mhaseeb1…
mhaseeb123 Apr 16, 2024
72089ac
apply reviewer suggestions
mhaseeb123 Apr 17, 2024
f984c01
Merge branch 'branch-24.06' into cudf-examples-cmake-fix
mhaseeb123 Apr 17, 2024
c088772
minor improvements
mhaseeb123 Apr 17, 2024
996367d
minor improvements and add default LIB_BUILD_DIR
mhaseeb123 Apr 17, 2024
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
3 changes: 2 additions & 1 deletion cpp/examples/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
# Root of examples
EXAMPLES_DIR=$(dirname "$(realpath "$0")")
LIB_BUILD_DIR=${LIB_BUILD_DIR:-$(readlink -f "${EXAMPLES_DIR}/../build")}
RAPIDS_ARCHS='70;80' # TODO: more generic one needed
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved

################################################################################
# Add individual libcudf examples build scripts down below
Expand All @@ -20,7 +21,7 @@ build_example() {
build_dir="${example_dir}/build"

# Configure
cmake -S ${example_dir} -B ${build_dir} -Dcudf_ROOT="${LIB_BUILD_DIR}"
cmake -S ${example_dir} -B ${build_dir} -Dcudf_ROOT="${LIB_BUILD_DIR}" -DCMAKE_CUDA_ARCHITECTURES="${RAPIDS_ARCHS}"
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
# Build
cmake --build ${build_dir} -j${PARALLEL_LEVEL}
}
Expand Down
25 changes: 16 additions & 9 deletions cpp/examples/fetch_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ file(
)
include(${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake)

set(CUDF_TAG branch-24.06)
CPMFindPackage(
NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf
GIT_TAG ${CUDF_TAG}
GIT_SHALLOW
TRUE
SOURCE_SUBDIR
cpp
)
# try to find an already built libcudf and use it.
find_package(cudf HINTS ${cudf_ROOT}/latest)

# build it via CPM
if (NOT cudf_FOUND)
set(CUDF_TAG branch-24.06)

CPMFindPackage(
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf
GIT_TAG ${CUDF_TAG}
GIT_SHALLOW
TRUE
SOURCE_SUBDIR
cpp
)
endif()
Loading