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

Use new rapids-logger library #4911

Merged
merged 13 commits into from
Feb 11, 2025
7 changes: 5 additions & 2 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand All @@ -15,7 +15,10 @@ rapids-print-env

rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcugraph
sccache --zero-stats

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild \
conda/recipes/libcugraph

sccache --show-adv-stats

Expand Down
1 change: 1 addition & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ EXCLUDE_ARGS+=(
--exclude "libcusolver.so.*"
--exclude "libcusparse.so.*"
--exclude "libnvJitLink.so.*"
--exclude "librapids_logger.so"
)

if [[ "${package_dir}" != "python/libcugraph" ]]; then
Expand Down
2 changes: 0 additions & 2 deletions ci/build_wheel_libcugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ rapids-logger "Done build requirements"
# 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735)
export PIP_NO_BUILD_ISOLATION=0

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

./ci/build_wheel.sh libcugraph ${package_dir} cpp
./ci/validate_wheel.sh ${package_dir} final_dist
10 changes: 5 additions & 5 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
# Copyright (c) 2022-2025, NVIDIA CORPORATION.

set -euo pipefail

Expand Down Expand Up @@ -31,10 +31,10 @@ mkdir -p "${RAPIDS_TESTS_DIR}"
rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"libcugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \
"libcugraph_etl=${RAPIDS_VERSION_MAJOR_MINOR}.*" \
"libcugraph-tests=${RAPIDS_VERSION_MAJOR_MINOR}.*"
--channel "${CPP_CHANNEL}" \
"libcugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \
"libcugraph_etl=${RAPIDS_VERSION_MAJOR_MINOR}.*" \
"libcugraph-tests=${RAPIDS_VERSION_MAJOR_MINOR}.*"

rapids-logger "Check GPU usage"
nvidia-smi
Expand Down
2 changes: 0 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,6 @@ target_link_libraries(cugraph
PRIVATE
${COMPILED_RAFT_LIB}
cuco::cuco
rmm::rmm_logger_impl
raft::raft_logger_impl
)

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function(find_and_configure_raft)
endif()

rapids_cpm_find(raft ${PKG_VERSION}
GLOBAL_TARGETS raft::raft raft::raft_logger raft::raft_logger_impl
GLOBAL_TARGETS raft::raft
BUILD_EXPORT_SET cugraph-exports
INSTALL_EXPORT_SET cugraph-exports
COMPONENTS ${RAFT_COMPONENTS}
Expand Down
7 changes: 0 additions & 7 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ function(ConfigureTest CMAKE_TEST_NAME)
cugraphtestutil
GTest::gtest
GTest::gtest_main
test_logger_impls
)
set_target_properties(
${CMAKE_TEST_NAME}
Expand Down Expand Up @@ -200,7 +199,6 @@ function(ConfigureTestMG CMAKE_TEST_NAME)
GTest::gtest_main
NCCL::NCCL
MPI::MPI_CXX
test_logger_impls
)
set_target_properties(
${CMAKE_TEST_NAME}
Expand Down Expand Up @@ -252,7 +250,6 @@ function(ConfigureCTest CMAKE_TEST_NAME)
cugraph_c_testutil
GTest::gtest
GTest::gtest_main
test_logger_impls
)
set_target_properties(
${CMAKE_TEST_NAME}
Expand Down Expand Up @@ -285,7 +282,6 @@ function(ConfigureCTestMG CMAKE_TEST_NAME)
GTest::gtest_main
NCCL::NCCL
MPI::MPI_CXX
test_logger_impls
)
set_target_properties(
${CMAKE_TEST_NAME}
Expand Down Expand Up @@ -314,9 +310,6 @@ function(ConfigureCTestMG CMAKE_TEST_NAME)

endfunction()

add_library(test_logger_impls OBJECT)
target_link_libraries(test_logger_impls PRIVATE raft::raft_logger_impl)


###################################################################################################
### test sources ##################################################################################
Expand Down
16 changes: 7 additions & 9 deletions python/libcugraph/libcugraph/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,17 @@ def _load_wheel_installation(soname: str):
def load_library():
"""Dynamically load libcugraph.so and its dependencies"""
try:
# libraft must be loaded before libcugraph because libcugraph
# references its symbols
# These libraries must be loaded before libcugraph because libcugraph references
# their symbols
import librmm
import libraft

librmm.load_library()
libraft.load_library()
except ModuleNotFoundError:
# 'libcugraph' has a runtime dependency on 'libraft'. However,
# that dependency might be satisfied by the 'libraft' conda package
# (which does not have any Python modules), instead of the
# 'libraft' wheel.
#
# In that situation, assume that 'libraft.so' is in a place where
# the loader can find it.
# These runtime dependencies might be satisfied by conda packages (which do not
# have any Python modules) instead of wheels. In that situation, assume that
# the libraries are in a place where the loader can find them.
pass

prefer_system_installation = (
Expand Down