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 to CCCL 2.2.0. #4052

Merged
merged 7 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
10 changes: 9 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revert changes to CI scripts that use upstream artifacts before merging.

LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 cpp)

version=$(rapids-generate-version)

rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild conda/recipes/libcugraph
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--channel "${LIBRMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
conda/recipes/libcugraph

rapids-upload-conda-to-s3 cpp
38 changes: 37 additions & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export CMAKE_GENERATOR=Ninja
rapids-print-env

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 python)
LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 cpp)
RAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 python)

version=$(rapids-generate-version)
git_commit=$(git rev-parse HEAD)
Expand All @@ -19,7 +25,7 @@ echo "${version}" > VERSION
rapids-logger "Begin py build"

package_dir="python"
for package_name in pylibcugraph cugraph nx-cugraph cugraph-pyg cugraph-dgl; do
for package_name in pylibcugraph cugraph nx-cugraph cugraph-pyg cugraph-dgl; do
underscore_package_name=$(echo "${package_name}" | tr "-" "_")
sed -i "/^__git_commit__/ s/= .*/= \"${git_commit}\"/g" "${package_dir}/${package_name}/${underscore_package_name}/_version.py"
done
Expand All @@ -29,11 +35,23 @@ done
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
conda/recipes/pylibcugraph

rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cugraph

Expand All @@ -44,6 +62,12 @@ rapids-conda-retry mambabuild \
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/nx-cugraph

Expand All @@ -68,6 +92,12 @@ if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
--channel pyg \
--channel pytorch \
Expand All @@ -78,6 +108,12 @@ if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then
rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
--channel dglteam \
--channel pytorch \
Expand Down
7 changes: 7 additions & 0 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@ conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 cpp)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
libcugraph libcugraph_etl libcugraph-tests

rapids-logger "Check GPU usage"
Expand Down
26 changes: 25 additions & 1 deletion ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ set -u
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
LIBRMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 cpp)
RMM_CHANNEL=$(rapids-get-pr-conda-artifact rmm 1404 python)
LIBCUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 cpp)
CUDF_CHANNEL=$(rapids-get-pr-conda-artifact cudf 14576 python)
LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 cpp)
RAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2049 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
Expand All @@ -31,6 +37,12 @@ rapids-print-env
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
libcugraph \
pylibcugraph \
cugraph \
Expand Down Expand Up @@ -148,6 +160,12 @@ if [[ "${RAPIDS_CUDA_VERSION}" == "11.8.0" ]]; then
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel pytorch \
--channel pytorch-nightly \
--channel dglteam/label/cu118 \
Expand Down Expand Up @@ -201,14 +219,20 @@ if [[ "${RAPIDS_CUDA_VERSION}" == "11.8.0" ]]; then
rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
--channel "${LIBRMM_CHANNEL}" \
--channel "${RMM_CHANNEL}" \
--channel "${LIBCUDF_CHANNEL}" \
--channel "${CUDF_CHANNEL}" \
--channel "${LIBRAFT_CHANNEL}" \
--channel "${RAFT_CHANNEL}" \
--channel pytorch \
--channel nvidia \
--channel pyg \
--channel rapidsai-nightly \
"cugraph-pyg" \
"pytorch>=2.0,<2.1" \
"pytorch-cuda=11.8"

# Install pyg dependencies (which requires pip)
pip install \
pyg_lib \
Expand Down
12 changes: 5 additions & 7 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ rapids_cpm_init()
###
# Linking to the `raft::raft` target implicitly links cugraph targets to the
# following public header-only raft dependencies:
# * CCCL
# * RMM
# * Thrust
# * GTest/GMock
#
# The CMakeLists.txt for each of these projects are properly configured
Expand All @@ -153,16 +153,14 @@ rapids_cpm_init()
# lags behind.
###

# Need to make sure rmm is found before cuco so that rmm patches the libcudacxx
# directory to be found by cuco.
# Need CCCL, then rmm, then cuCollections, then RAFT.
# This ensures that libraries can be overridden for testing.
vyasr marked this conversation as resolved.
Show resolved Hide resolved
include(cmake/thirdparty/get_cccl.cmake)
include(${rapids-cmake-dir}/cpm/rmm.cmake)
rapids_cpm_rmm(BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports)
# Putting this before raft to override RAFT from pulling them in.
include(cmake/thirdparty/get_libcudacxx.cmake)
INSTALL_EXPORT_SET cugraph-exports)
include(${rapids-cmake-dir}/cpm/cuco.cmake)
rapids_cpm_cuco(BUILD_EXPORT_SET cugraph-exports INSTALL_EXPORT_SET cugraph-exports)

include(cmake/thirdparty/get_raft.cmake)

if(USE_CUGRAPH_OPS)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
Expand All @@ -12,12 +12,10 @@
# the License.
# =============================================================================

# This function finds libcudacxx and sets any additional necessary environment variables.
function(find_and_configure_libcudacxx)
include(${rapids-cmake-dir}/cpm/libcudacxx.cmake)

rapids_cpm_libcudacxx(BUILD_EXPORT_SET cugraph-exports)

# This function finds CCCL and sets any additional necessary environment variables.
function(find_and_configure_cccl)
include(${rapids-cmake-dir}/cpm/cccl.cmake)
rapids_cpm_cccl(BUILD_EXPORT_SET cugraph-exports INSTALL_EXPORT_SET cugraph-exports)
endfunction()

find_and_configure_libcudacxx()
find_and_configure_cccl()
2 changes: 2 additions & 0 deletions fetch_rapids.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
set(rapids-cmake-repo bdice/rapids-cmake)
set(rapids-cmake-branch cuco-cccl-2.2.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revert this before merging. Depends on NVIDIA/cuCollections#404 merging, and rapids-cmake being updated to use that commit in versions.json.

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CUGRAPH_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-24.02/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/CUGRAPH_RAPIDS.cmake
Expand Down
Loading