From d7f17905527e7c014e161ee77bd2b5c87bdafa31 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 17 Dec 2024 23:33:11 +0000 Subject: [PATCH 1/5] Test against raft logger --- ci/build_cpp.sh | 6 +++++- cpp/cmake/thirdparty/get_raft.cmake | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 93e5c680d07..9dedafcd8f0 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -15,7 +15,11 @@ rapids-print-env rapids-logger "Begin cpp build" -RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcugraph +LIBRAFT_CHANNEL=$(rapids-get-pr-conda-artifact raft 2530 cpp) + +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild \ + --channel "${LIBRAFT_CHANNEL}" \ + conda/recipes/libcugraph sccache --show-adv-stats diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 8f56372c81a..daded2779b9 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -67,13 +67,13 @@ endfunction() # To use a different RAFT locally, set the CMake variable # CPM_raft_SOURCE=/path/to/local/raft find_and_configure_raft(VERSION ${CUGRAPH_MIN_VERSION_raft} - FORK rapidsai - PINNED_TAG branch-${CUGRAPH_BRANCH_VERSION_raft} + FORK vyasr + PINNED_TAG feat/logger # When PINNED_TAG above doesn't match cugraph, # force local raft clone in build directory # even if it's already installed. - CLONE_ON_PIN ON + CLONE_ON_PIN OFF USE_RAFT_STATIC ${USE_RAFT_STATIC} COMPILE_RAFT_LIB ${CUGRAPH_COMPILE_RAFT_LIB} ) From d603a2aae6f33cd5ce9b41cf6c3cd11a3c74131d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 18 Dec 2024 18:26:04 +0000 Subject: [PATCH 2/5] Add the logger impl to the raft test util --- cpp/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 44963f91515..2eacdfb99e9 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -70,6 +70,7 @@ target_link_libraries(cugraphtestutil cugraph::cugraph PRIVATE GTest::gtest + raft::raft_logger_impl ) From d6ef64aa46ad127060403a786bdb855894684218 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 18 Dec 2024 22:56:45 +0000 Subject: [PATCH 3/5] Link the logger impls directly into the tests --- cpp/tests/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 2eacdfb99e9..8a0629f31f8 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -70,7 +70,6 @@ target_link_libraries(cugraphtestutil cugraph::cugraph PRIVATE GTest::gtest - raft::raft_logger_impl ) @@ -189,6 +188,9 @@ function(ConfigureTest CMAKE_TEST_NAME) set_tests_properties(${CMAKE_TEST_NAME} PROPERTIES LABELS "CUGRAPH") endfunction() +add_library(test_logger_impls OBJECT) +target_link_libraries(test_logger_impls PRIVATE raft::raft_logger_impl) + function(ConfigureTestMG CMAKE_TEST_NAME) add_executable(${CMAKE_TEST_NAME} ${ARGN}) target_include_directories(${CMAKE_TEST_NAME} PRIVATE "${CUGRAPH_SOURCE_DIR}/src") @@ -200,6 +202,7 @@ function(ConfigureTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX + test_logger_impls ) set_target_properties( ${CMAKE_TEST_NAME} From 088b72958c4764ed9798a1f231f20b04e0dffec3 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 19 Dec 2024 00:18:14 +0000 Subject: [PATCH 4/5] Add for all the tests --- cpp/tests/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 8a0629f31f8..4cc9f2d94bf 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -169,6 +169,7 @@ function(ConfigureTest CMAKE_TEST_NAME) cugraphtestutil GTest::gtest GTest::gtest_main + test_logger_impls ) set_target_properties( ${CMAKE_TEST_NAME} @@ -188,9 +189,6 @@ function(ConfigureTest CMAKE_TEST_NAME) set_tests_properties(${CMAKE_TEST_NAME} PROPERTIES LABELS "CUGRAPH") endfunction() -add_library(test_logger_impls OBJECT) -target_link_libraries(test_logger_impls PRIVATE raft::raft_logger_impl) - function(ConfigureTestMG CMAKE_TEST_NAME) add_executable(${CMAKE_TEST_NAME} ${ARGN}) target_include_directories(${CMAKE_TEST_NAME} PRIVATE "${CUGRAPH_SOURCE_DIR}/src") @@ -254,6 +252,7 @@ function(ConfigureCTest CMAKE_TEST_NAME) cugraph_c_testutil GTest::gtest GTest::gtest_main + test_logger_impls ) set_target_properties( ${CMAKE_TEST_NAME} @@ -286,6 +285,7 @@ function(ConfigureCTestMG CMAKE_TEST_NAME) GTest::gtest_main NCCL::NCCL MPI::MPI_CXX + test_logger_impls ) set_target_properties( ${CMAKE_TEST_NAME} @@ -314,6 +314,10 @@ 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 ################################################################################## ################################################################################################### From 5d3481cec225cc3e9d1d81bba2f7108ad5d2ddff Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 19 Dec 2024 02:32:41 +0000 Subject: [PATCH 5/5] Make sure that the raft logger is linked into libcugraph --- cpp/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 8ecab358dd0..ad30b3769d7 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -488,6 +488,7 @@ target_link_libraries(cugraph ${COMPILED_RAFT_LIB} cuco::cuco rmm::rmm_logger_impl + raft::raft_logger_impl ) ################################################################################