From 7a6bb817ad896c63471c70b36d14b04a3fba168e Mon Sep 17 00:00:00 2001 From: niranda perera Date: Thu, 11 Jun 2026 17:38:05 -0700 Subject: [PATCH 01/21] adding distirbuted cudf streaming tests Signed-off-by: niranda perera --- .../ConfigureOptionalCommunication.cmake | 4 +- .../cmake/thirdparty/get_cudf.cmake | 8 ++ cpp/libcudf_streaming/tests/CMakeLists.txt | 91 +++++++++++++++++++ cpp/libcudf_streaming/tests/environment.hpp | 29 ++++-- cpp/libcudf_streaming/tests/main/mpi.cpp | 83 +++++++++++++++++ cpp/libcudf_streaming/tests/main/single.cpp | 42 +++++---- cpp/libcudf_streaming/tests/main/ucxx.cpp | 81 +++++++++++++++++ 7 files changed, 310 insertions(+), 28 deletions(-) create mode 100644 cpp/libcudf_streaming/tests/main/mpi.cpp create mode 100644 cpp/libcudf_streaming/tests/main/ucxx.cpp diff --git a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake index 1122e9618580..d788b7636dfd 100644 --- a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake +++ b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake @@ -12,7 +12,7 @@ set(CUDF_STREAMING_FOUND_UCXX OFF) set(CUDF_STREAMING_HAVE_MPI OFF) set(CUDF_STREAMING_HAVE_UCXX OFF) -if(BUILD_BENCHMARKS OR BUILD_EXAMPLES) +if(BUILD_BENCHMARKS OR BUILD_EXAMPLES OR BUILD_TESTS) rapids_find_package( MPI QUIET BUILD_EXPORT_SET cudf_streaming-exports @@ -23,7 +23,7 @@ if(BUILD_BENCHMARKS OR BUILD_EXAMPLES) endif() endif() -if(BUILD_BENCHMARKS) +if(BUILD_BENCHMARKS OR BUILD_TESTS) rapids_find_package( ucxx QUIET BUILD_EXPORT_SET cudf_streaming-exports diff --git a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake index d8c816fe1eb7..b86e5d4299d2 100644 --- a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake +++ b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake @@ -12,6 +12,14 @@ set(CUDF_STREAMING_MIN_VERSION ) find_and_configure_cudf(${CUDF_STREAMING_MIN_VERSION} cudf_streaming-exports) +# The cudf-dependent tests link against cudf::cudftestutil{,_impl}, which live in cudf's optional +# `testing` component. The transitive find_dependency(cudf) triggered by find_and_configure_cudf +# does not request it, so request it explicitly here when building tests. This avoids having to +# build cudf from source: the component is provided by the installed (e.g. conda) cudf package. +if(BUILD_TESTS AND NOT TARGET cudf::cudftestutil) + find_package(cudf ${CUDF_STREAMING_MIN_VERSION} REQUIRED COMPONENTS testing) +endif() + if(cudf_REQUIRES_CUDA) rapids_cuda_init_architectures(CUDF_STREAMING) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 5b6cf230d699..f6fccd2cb4a0 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -20,6 +20,33 @@ if(NOT EXISTS "${_cudf_streaming_gtests_link}") file(CREATE_LINK "${CUDF_STREAMING_BINARY_DIR}/gtests" "${_cudf_streaming_gtests_link}" SYMBOLIC) endif() +# Create a separate test case for each of these n_ranks. +set(nranks_to_run 1 2 5) + +# A helper function to create a test case for each parallelism (defined by nranks_to_run). +# TEST_TARGET is the name of the test target (required). This adds len(nranks_to_run) test cases +# identified by _. NOTE: When running ctest, the TEST_TARGET executable should +# be located in the ./gtests/ directory relative to the PWD. +function(cudf_streaming_mpirun_test_add) + set(options) # no options + set(one_value TEST_TARGET) + set(multi_value) # no multi_value args + cmake_parse_arguments(_MPIRUN_TEST "${options}" "${one_value}" "${multi_value}" ${ARGN}) + + if(NOT DEFINED _MPIRUN_TEST_TEST_TARGET) + message(FATAL_ERROR "cudf_streaming_mpirun_test_add called without a test prefix") + endif() + + message(STATUS "Adding mpirun test: ${_MPIRUN_TEST_TEST_TARGET} nranks: ${nranks_to_run}") + foreach(np IN ITEMS ${nranks_to_run}) + # add the test using the relative path of the target + add_test( + NAME "${_MPIRUN_TEST_TEST_TARGET}_${np}" COMMAND mpirun --map-by node --bind-to none -np + ${np} "gtests/${_MPIRUN_TEST_TEST_TARGET}" + ) + endforeach(np) +endfunction(cudf_streaming_mpirun_test_add) + add_library(cudf_streaming_test_sources OBJECT) set_target_properties( cudf_streaming_test_sources @@ -38,6 +65,13 @@ target_link_libraries( PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf::cudftestutil cudf::cudftestutil_impl PUBLIC GTest::gmock GTest::gtest ) +# cudf::cudftestutil_impl injects cudf test-utility .cu sources (via INTERFACE_SOURCES) that are +# compiled into this object library. Those sources use device lambdas, so they require the same CUDA +# flags cudf builds them with (notably --expt-extended-lambda from CUDF_CUDA_FLAGS). +target_compile_options( + cudf_streaming_test_sources + PRIVATE "$<$:${CUDF_CUDA_FLAGS}>" +) target_sources( cudf_streaming_test_sources PRIVATE streaming/test_table_chunk.cpp @@ -81,6 +115,63 @@ rapids_test_add( INSTALL_COMPONENT_SET testing ) +# ################################################################################################## +# MPI and UCXX based tests ------------------------------------------------------------------------- +# These executables reuse cudf_streaming_test_sources but provide a different test environment main +# (main/mpi.cpp / main/ucxx.cpp), and are launched via mpirun for multiple ranks. +if(CUDF_STREAMING_HAVE_MPI) + add_executable(cudf_streaming_mpi_tests main/mpi.cpp) + set_target_properties( + cudf_streaming_mpi_tests + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" + INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS ON + CUDA_STANDARD 20 + CUDA_STANDARD_REQUIRED ON + ) + target_include_directories( + cudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + "${CMAKE_CURRENT_SOURCE_DIR}" + ) + target_link_libraries( + cudf_streaming_mpi_tests + PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication GTest::gmock + GTest::gtest $ cudf_streaming_test_sources + ) + cudf_streaming_mpirun_test_add(TEST_TARGET cudf_streaming_mpi_tests) + + if(CUDF_STREAMING_HAVE_UCXX) + add_executable(cudf_streaming_ucxx_tests main/ucxx.cpp) + set_target_properties( + cudf_streaming_ucxx_tests + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" + INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS ON + CUDA_STANDARD 20 + CUDA_STANDARD_REQUIRED ON + ) + target_include_directories( + cudf_streaming_ucxx_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + "${CMAKE_CURRENT_SOURCE_DIR}" + ) + target_link_libraries( + cudf_streaming_ucxx_tests + PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication + GTest::gmock GTest::gtest $ + cudf_streaming_test_sources + ) + cudf_streaming_mpirun_test_add(TEST_TARGET cudf_streaming_ucxx_tests) + else() + cudf_streaming_skip_optional_target(cudf_streaming_ucxx_tests "UCXX not found") + endif() +else() + cudf_streaming_skip_optional_target(cudf_streaming_mpi_tests "MPI not found") +endif() + rapids_test_install_relocatable( INSTALL_COMPONENT_SET testing DESTINATION bin/gtests/libcudf_streaming ) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index 648d010ea11b..e58705e83742 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -8,29 +8,42 @@ #include +#include + enum class TestEnvironmentType : int { + MPI, + UCXX, SINGLE, }; +/** + * Base test environment that exposes a communicator to the test suite. Concrete, + * communicator-specific environments (single/MPI/UCXX) derive from this class and are defined in + * the corresponding `main/*.cpp`, where the communicator-specific state (e.g. the MPI communicator) + * and headers live. Exactly one of them is linked into each test executable. + */ class Environment : public ::testing::Environment { public: - Environment(int argc, char** argv); + Environment(int argc, char** argv) : argc_(argc), argv_(argv) {} + ~Environment() override = default; - void SetUp() override; + void SetUp() override = 0; - void TearDown() override; + void TearDown() override = 0; - void barrier(); + virtual void barrier() = 0; - [[nodiscard]] TestEnvironmentType type() const; + [[nodiscard]] virtual TestEnvironmentType type() const = 0; - constexpr rapidsmpf::config::Options& options() { return options_; } + rapidsmpf::config::Options& options() { return options_; } - std::shared_ptr split_comm(); + virtual std::shared_ptr split_comm() = 0; std::shared_ptr comm_; - private: + protected: + int argc_; + char** argv_; std::shared_ptr split_comm_{nullptr}; rapidsmpf::config::Options options_; }; diff --git a/cpp/libcudf_streaming/tests/main/mpi.cpp b/cpp/libcudf_streaming/tests/main/mpi.cpp new file mode 100644 index 000000000000..a03f732c9821 --- /dev/null +++ b/cpp/libcudf_streaming/tests/main/mpi.cpp @@ -0,0 +1,83 @@ +/** + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights + * reserved. SPDX-License-Identifier: Apache-2.0 + */ + +#include "../environment.hpp" + +#include + +#include +#include +#include + +#include + +#include + +namespace { +class MPIEnvironment : public Environment { + public: + using Environment::Environment; + + [[nodiscard]] TestEnvironmentType type() const override { return TestEnvironmentType::MPI; } + + void SetUp() override + { + rapidsmpf::mpi::init(&argc_, &argv_); + + RAPIDSMPF_MPI(MPI_Comm_dup(MPI_COMM_WORLD, &mpi_comm_)); + + options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); + + comm_ = std::make_shared( + mpi_comm_, options_, std::make_shared()); + } + + void TearDown() override + { + split_comm_ = nullptr; // Clean up the split communicator. + comm_ = nullptr; // Clean up the communicator. + + RAPIDSMPF_MPI(MPI_Comm_free(&mpi_comm_)); + RAPIDSMPF_MPI(MPI_Finalize()); + } + + void barrier() override { RAPIDSMPF_MPI(MPI_Barrier(mpi_comm_)); } + + std::shared_ptr split_comm() override + { + // Return cached split communicator if it exists + if (split_comm_ != nullptr) { return split_comm_; } + + // Initialize configuration options from environment variables. + rapidsmpf::config::Options options{rapidsmpf::config::get_environment_variables()}; + + // Create the new split communicator + int rank; + RAPIDSMPF_MPI(MPI_Comm_rank(mpi_comm_, &rank)); + MPI_Comm split_comm = MPI_COMM_NULL; + RAPIDSMPF_MPI(MPI_Comm_split(mpi_comm_, rank, 0, &split_comm)); + return std::shared_ptr( + new rapidsmpf::MPI(split_comm, options, comm_->progress_thread()), + // Don't leak the split handle. + [comm = split_comm](rapidsmpf::MPI* x) mutable { + delete x; + MPI_Comm_free(&comm); + }); + } + + private: + MPI_Comm mpi_comm_{MPI_COMM_NULL}; +}; +} // namespace + +Environment* GlobalEnvironment = nullptr; + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + GlobalEnvironment = new MPIEnvironment(argc, argv); + ::testing::AddGlobalTestEnvironment(GlobalEnvironment); + return RUN_ALL_TESTS(); +} diff --git a/cpp/libcudf_streaming/tests/main/single.cpp b/cpp/libcudf_streaming/tests/main/single.cpp index 22a4a9286790..31dc7c04226b 100644 --- a/cpp/libcudf_streaming/tests/main/single.cpp +++ b/cpp/libcudf_streaming/tests/main/single.cpp @@ -8,38 +8,44 @@ #include #include +#include #include #include -Environment* GlobalEnvironment = nullptr; +namespace { +class SingleEnvironment : public Environment { + public: + using Environment::Environment; -Environment::Environment(int, char**) {} + [[nodiscard]] TestEnvironmentType type() const override { return TestEnvironmentType::SINGLE; } -TestEnvironmentType Environment::type() const { return TestEnvironmentType::SINGLE; } + void SetUp() override + { + options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); + comm_ = + std::make_shared(options_, std::make_shared()); + split_comm_ = comm_; + } -void Environment::SetUp() -{ - options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); - comm_ = - std::make_shared(options_, std::make_shared()); - split_comm_ = comm_; -} + void TearDown() override + { + split_comm_ = nullptr; + comm_ = nullptr; + } -void Environment::TearDown() -{ - split_comm_ = nullptr; - comm_ = nullptr; -} + void barrier() override {} -void Environment::barrier() {} + std::shared_ptr split_comm() override { return split_comm_; } +}; +} // namespace -std::shared_ptr Environment::split_comm() { return split_comm_; } +Environment* GlobalEnvironment = nullptr; int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - GlobalEnvironment = new Environment(argc, argv); + GlobalEnvironment = new SingleEnvironment(argc, argv); ::testing::AddGlobalTestEnvironment(GlobalEnvironment); return RUN_ALL_TESTS(); } diff --git a/cpp/libcudf_streaming/tests/main/ucxx.cpp b/cpp/libcudf_streaming/tests/main/ucxx.cpp new file mode 100644 index 000000000000..167922e571c3 --- /dev/null +++ b/cpp/libcudf_streaming/tests/main/ucxx.cpp @@ -0,0 +1,81 @@ +/** + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights + * reserved. SPDX-License-Identifier: Apache-2.0 + */ + +#include "../environment.hpp" + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +namespace { +class UCXXEnvironment : public Environment { + public: + using Environment::Environment; + + [[nodiscard]] TestEnvironmentType type() const override { return TestEnvironmentType::UCXX; } + + void SetUp() override + { + // Ensure CUDA context is created before UCX is initialized. + cudaFree(nullptr); + + // Explicitly initialize MPI. We can not use rapidsmpf::mpi::init as it checks some + // rapidsmpf::MPI communicator specific conditions + int provided; + RAPIDSMPF_MPI(MPI_Init_thread(&argc_, &argv_, MPI_THREAD_MULTIPLE, &provided)); + RAPIDSMPF_EXPECTS( + provided == MPI_THREAD_MULTIPLE, + "didn't get the requested thread level support: MPI_THREAD_MULTIPLE"); + + options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); + comm_ = rapidsmpf::ucxx::init_using_mpi( + MPI_COMM_WORLD, options_, std::make_shared()); + } + + void TearDown() override + { + // Ensure UCXX cleanup before MPI. If this is not done failures related to + // accessing the CUDA context may be thrown during shutdown. + split_comm_ = nullptr; // Clean up the split communicator. + comm_ = nullptr; // Clean up the communicator. + RAPIDSMPF_MPI(MPI_Finalize()); + } + + void barrier() override + { + std::dynamic_pointer_cast(comm_)->barrier(); + } + + std::shared_ptr split_comm() override + { + // Return cached split communicator if it exists + if (split_comm_ != nullptr) { return split_comm_; } + + // Create and cache the new split communicator + split_comm_ = std::dynamic_pointer_cast(comm_)->split(); + return split_comm_; + } +}; +} // namespace + +Environment* GlobalEnvironment = nullptr; + +int main(int argc, char** argv) +{ + ::testing::InitGoogleTest(&argc, argv); + GlobalEnvironment = new UCXXEnvironment(argc, argv); + ::testing::AddGlobalTestEnvironment(GlobalEnvironment); + return RUN_ALL_TESTS(); +} From 4476694b8062d79d33e7174383caeb80a6c0367f Mon Sep 17 00:00:00 2001 From: niranda perera Date: Fri, 12 Jun 2026 13:09:39 -0700 Subject: [PATCH 02/21] precommit Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/main/mpi.cpp | 3 +-- cpp/libcudf_streaming/tests/main/ucxx.cpp | 16 ++++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/cpp/libcudf_streaming/tests/main/mpi.cpp b/cpp/libcudf_streaming/tests/main/mpi.cpp index a03f732c9821..7b0c4d341c17 100644 --- a/cpp/libcudf_streaming/tests/main/mpi.cpp +++ b/cpp/libcudf_streaming/tests/main/mpi.cpp @@ -7,12 +7,11 @@ #include +#include #include #include #include -#include - #include namespace { diff --git a/cpp/libcudf_streaming/tests/main/ucxx.cpp b/cpp/libcudf_streaming/tests/main/ucxx.cpp index 167922e571c3..431d0d544228 100644 --- a/cpp/libcudf_streaming/tests/main/ucxx.cpp +++ b/cpp/libcudf_streaming/tests/main/ucxx.cpp @@ -7,14 +7,14 @@ #include +#include + +#include #include #include #include #include #include - -#include -#include #include #include @@ -35,9 +35,8 @@ class UCXXEnvironment : public Environment { // rapidsmpf::MPI communicator specific conditions int provided; RAPIDSMPF_MPI(MPI_Init_thread(&argc_, &argv_, MPI_THREAD_MULTIPLE, &provided)); - RAPIDSMPF_EXPECTS( - provided == MPI_THREAD_MULTIPLE, - "didn't get the requested thread level support: MPI_THREAD_MULTIPLE"); + RAPIDSMPF_EXPECTS(provided == MPI_THREAD_MULTIPLE, + "didn't get the requested thread level support: MPI_THREAD_MULTIPLE"); options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); comm_ = rapidsmpf::ucxx::init_using_mpi( @@ -53,10 +52,7 @@ class UCXXEnvironment : public Environment { RAPIDSMPF_MPI(MPI_Finalize()); } - void barrier() override - { - std::dynamic_pointer_cast(comm_)->barrier(); - } + void barrier() override { std::dynamic_pointer_cast(comm_)->barrier(); } std::shared_ptr split_comm() override { From eeb68c7fddc59615d262f2e10e00bc9e42b1e830 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Fri, 12 Jun 2026 16:20:39 -0700 Subject: [PATCH 03/21] style Signed-off-by: niranda perera --- .../cmake/ConfigureOptionalCommunication.cmake | 5 ++++- cpp/libcudf_streaming/tests/CMakeLists.txt | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake index d788b7636dfd..ad5d5aab65d2 100644 --- a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake +++ b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake @@ -12,7 +12,10 @@ set(CUDF_STREAMING_FOUND_UCXX OFF) set(CUDF_STREAMING_HAVE_MPI OFF) set(CUDF_STREAMING_HAVE_UCXX OFF) -if(BUILD_BENCHMARKS OR BUILD_EXAMPLES OR BUILD_TESTS) +if(BUILD_BENCHMARKS + OR BUILD_EXAMPLES + OR BUILD_TESTS +) rapids_find_package( MPI QUIET BUILD_EXPORT_SET cudf_streaming-exports diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index f6fccd2cb4a0..0a99b802e0a0 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -69,8 +69,7 @@ target_link_libraries( # compiled into this object library. Those sources use device lambdas, so they require the same CUDA # flags cudf builds them with (notably --expt-extended-lambda from CUDF_CUDA_FLAGS). target_compile_options( - cudf_streaming_test_sources - PRIVATE "$<$:${CUDF_CUDA_FLAGS}>" + cudf_streaming_test_sources PRIVATE "$<$:${CUDF_CUDA_FLAGS}>" ) target_sources( cudf_streaming_test_sources @@ -160,8 +159,13 @@ if(CUDF_STREAMING_HAVE_MPI) ) target_link_libraries( cudf_streaming_ucxx_tests - PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication - GTest::gmock GTest::gtest $ + PRIVATE cudf_streaming + rapidsmpf::rapidsmpf + cudf_streaming::optional_communication + ucxx::ucxx + GTest::gmock + GTest::gtest + $ cudf_streaming_test_sources ) cudf_streaming_mpirun_test_add(TEST_TARGET cudf_streaming_ucxx_tests) From cef02228dba7d68615af92ce23177066bc0202bb Mon Sep 17 00:00:00 2001 From: niranda perera Date: Fri, 12 Jun 2026 17:19:32 -0700 Subject: [PATCH 04/21] minor fix Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/environment.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index e58705e83742..53dd9c3c73c5 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -19,7 +19,7 @@ enum class TestEnvironmentType : int { /** * Base test environment that exposes a communicator to the test suite. Concrete, * communicator-specific environments (single/MPI/UCXX) derive from this class and are defined in - * the corresponding `main/*.cpp`, where the communicator-specific state (e.g. the MPI communicator) + * the corresponding main/*.cpp, where the communicator-specific state (e.g. the MPI communicator) * and headers live. Exactly one of them is linked into each test executable. */ class Environment : public ::testing::Environment { From dc213d827311ca8c2c09d55e58365ba7588c3af7 Mon Sep 17 00:00:00 2001 From: Niranda Perera Date: Mon, 15 Jun 2026 08:20:20 -0700 Subject: [PATCH 05/21] Clarify file structure in Environment class comment Updated comment to clarify file structure for communicator-specific environments. --- cpp/libcudf_streaming/tests/environment.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index 53dd9c3c73c5..af2c2832ffb1 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -19,8 +19,8 @@ enum class TestEnvironmentType : int { /** * Base test environment that exposes a communicator to the test suite. Concrete, * communicator-specific environments (single/MPI/UCXX) derive from this class and are defined in - * the corresponding main/*.cpp, where the communicator-specific state (e.g. the MPI communicator) - * and headers live. Exactly one of them is linked into each test executable. + * the corresponding file in main dir, where the communicator-specific state (e.g. the MPI + * communicator) and headers live. Exactly one of them is linked into each test executable. */ class Environment : public ::testing::Environment { public: From 74a226f2a7b606268574051fc5add0bc8613c48d Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 15 Jun 2026 08:31:17 -0700 Subject: [PATCH 06/21] precommit Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/environment.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index af2c2832ffb1..28606b0554df 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -19,7 +19,7 @@ enum class TestEnvironmentType : int { /** * Base test environment that exposes a communicator to the test suite. Concrete, * communicator-specific environments (single/MPI/UCXX) derive from this class and are defined in - * the corresponding file in main dir, where the communicator-specific state (e.g. the MPI + * the corresponding file in main dir, where the communicator-specific state (e.g. the MPI * communicator) and headers live. Exactly one of them is linked into each test executable. */ class Environment : public ::testing::Environment { From 02b3979bbdb2c320e548c01959610c19b0418020 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 15 Jun 2026 16:08:11 -0700 Subject: [PATCH 07/21] addressing coderabbit comments Signed-off-by: niranda perera --- .../cmake/thirdparty/get_cudf.cmake | 6 ++++++ cpp/libcudf_streaming/tests/environment.hpp | 1 - cpp/libcudf_streaming/tests/main/mpi.cpp | 6 +----- cpp/libcudf_streaming/tests/main/single.cpp | 9 ++------- cpp/libcudf_streaming/tests/main/ucxx.cpp | 12 +++--------- 5 files changed, 12 insertions(+), 22 deletions(-) diff --git a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake index b86e5d4299d2..ec34b3fa9545 100644 --- a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake +++ b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake @@ -18,6 +18,12 @@ find_and_configure_cudf(${CUDF_STREAMING_MIN_VERSION} cudf_streaming-exports) # build cudf from source: the component is provided by the installed (e.g. conda) cudf package. if(BUILD_TESTS AND NOT TARGET cudf::cudftestutil) find_package(cudf ${CUDF_STREAMING_MIN_VERSION} REQUIRED COMPONENTS testing) + + foreach(_target cudf::cudftestutil cudf::cudftestutil_impl) + if(NOT TARGET ${_target}) + message(WARNING "cudf testing target NOT available: ${_target}") + endif() + endforeach() endif() if(cudf_REQUIRES_CUDA) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index 28606b0554df..f8507701578b 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -44,7 +44,6 @@ class Environment : public ::testing::Environment { protected: int argc_; char** argv_; - std::shared_ptr split_comm_{nullptr}; rapidsmpf::config::Options options_; }; diff --git a/cpp/libcudf_streaming/tests/main/mpi.cpp b/cpp/libcudf_streaming/tests/main/mpi.cpp index 7b0c4d341c17..c8225747af22 100644 --- a/cpp/libcudf_streaming/tests/main/mpi.cpp +++ b/cpp/libcudf_streaming/tests/main/mpi.cpp @@ -35,8 +35,7 @@ class MPIEnvironment : public Environment { void TearDown() override { - split_comm_ = nullptr; // Clean up the split communicator. - comm_ = nullptr; // Clean up the communicator. + comm_ = nullptr; // Clean up the communicator. RAPIDSMPF_MPI(MPI_Comm_free(&mpi_comm_)); RAPIDSMPF_MPI(MPI_Finalize()); @@ -46,9 +45,6 @@ class MPIEnvironment : public Environment { std::shared_ptr split_comm() override { - // Return cached split communicator if it exists - if (split_comm_ != nullptr) { return split_comm_; } - // Initialize configuration options from environment variables. rapidsmpf::config::Options options{rapidsmpf::config::get_environment_variables()}; diff --git a/cpp/libcudf_streaming/tests/main/single.cpp b/cpp/libcudf_streaming/tests/main/single.cpp index 31dc7c04226b..272a73a14070 100644 --- a/cpp/libcudf_streaming/tests/main/single.cpp +++ b/cpp/libcudf_streaming/tests/main/single.cpp @@ -25,18 +25,13 @@ class SingleEnvironment : public Environment { options_ = rapidsmpf::config::Options(rapidsmpf::config::get_environment_variables()); comm_ = std::make_shared(options_, std::make_shared()); - split_comm_ = comm_; } - void TearDown() override - { - split_comm_ = nullptr; - comm_ = nullptr; - } + void TearDown() override { comm_ = nullptr; } void barrier() override {} - std::shared_ptr split_comm() override { return split_comm_; } + std::shared_ptr split_comm() override { return comm_; } }; } // namespace diff --git a/cpp/libcudf_streaming/tests/main/ucxx.cpp b/cpp/libcudf_streaming/tests/main/ucxx.cpp index 431d0d544228..35f2ff3187d3 100644 --- a/cpp/libcudf_streaming/tests/main/ucxx.cpp +++ b/cpp/libcudf_streaming/tests/main/ucxx.cpp @@ -29,7 +29,7 @@ class UCXXEnvironment : public Environment { void SetUp() override { // Ensure CUDA context is created before UCX is initialized. - cudaFree(nullptr); + RAPIDSMPF_CUDA_TRY(cudaFree(nullptr)); // Explicitly initialize MPI. We can not use rapidsmpf::mpi::init as it checks some // rapidsmpf::MPI communicator specific conditions @@ -47,8 +47,7 @@ class UCXXEnvironment : public Environment { { // Ensure UCXX cleanup before MPI. If this is not done failures related to // accessing the CUDA context may be thrown during shutdown. - split_comm_ = nullptr; // Clean up the split communicator. - comm_ = nullptr; // Clean up the communicator. + comm_ = nullptr; // Clean up the communicator. RAPIDSMPF_MPI(MPI_Finalize()); } @@ -56,12 +55,7 @@ class UCXXEnvironment : public Environment { std::shared_ptr split_comm() override { - // Return cached split communicator if it exists - if (split_comm_ != nullptr) { return split_comm_; } - - // Create and cache the new split communicator - split_comm_ = std::dynamic_pointer_cast(comm_)->split(); - return split_comm_; + return std::dynamic_pointer_cast(comm_)->split(); } }; } // namespace From 7c6544ff5770fb4cb4b8dce3c52385d15daa94c7 Mon Sep 17 00:00:00 2001 From: Niranda Perera Date: Tue, 16 Jun 2026 11:41:16 -0700 Subject: [PATCH 08/21] Rename functions and variables for consistency --- cpp/libcudf_streaming/tests/CMakeLists.txt | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 0a99b802e0a0..27c51ad3f276 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -27,14 +27,14 @@ set(nranks_to_run 1 2 5) # TEST_TARGET is the name of the test target (required). This adds len(nranks_to_run) test cases # identified by _. NOTE: When running ctest, the TEST_TARGET executable should # be located in the ./gtests/ directory relative to the PWD. -function(cudf_streaming_mpirun_test_add) +function(libcudf_streaming_mpirun_test_add) set(options) # no options set(one_value TEST_TARGET) set(multi_value) # no multi_value args cmake_parse_arguments(_MPIRUN_TEST "${options}" "${one_value}" "${multi_value}" ${ARGN}) if(NOT DEFINED _MPIRUN_TEST_TEST_TARGET) - message(FATAL_ERROR "cudf_streaming_mpirun_test_add called without a test prefix") + message(FATAL_ERROR "libcudf_streaming_mpirun_test_add called without a test prefix") endif() message(STATUS "Adding mpirun test: ${_MPIRUN_TEST_TEST_TARGET} nranks: ${nranks_to_run}") @@ -45,11 +45,11 @@ function(cudf_streaming_mpirun_test_add) ${np} "gtests/${_MPIRUN_TEST_TEST_TARGET}" ) endforeach(np) -endfunction(cudf_streaming_mpirun_test_add) +endfunction(libcudf_streaming_mpirun_test_add) -add_library(cudf_streaming_test_sources OBJECT) +add_library(libcudf_streaming_test_sources OBJECT) set_target_properties( - cudf_streaming_test_sources + libcudf_streaming_test_sources PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS ON @@ -57,11 +57,11 @@ set_target_properties( CUDA_STANDARD_REQUIRED ON ) target_include_directories( - cudf_streaming_test_sources PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + libcudf_streaming_test_sources PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( - cudf_streaming_test_sources + libcudf_streaming_test_sources PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf::cudftestutil cudf::cudftestutil_impl PUBLIC GTest::gmock GTest::gtest ) @@ -69,10 +69,10 @@ target_link_libraries( # compiled into this object library. Those sources use device lambdas, so they require the same CUDA # flags cudf builds them with (notably --expt-extended-lambda from CUDF_CUDA_FLAGS). target_compile_options( - cudf_streaming_test_sources PRIVATE "$<$:${CUDF_CUDA_FLAGS}>" + libcudf_streaming_test_sources PRIVATE "$<$:${CUDF_CUDA_FLAGS}>" ) target_sources( - cudf_streaming_test_sources + libcudf_streaming_test_sources PRIVATE streaming/test_table_chunk.cpp streaming/test_read_parquet.cpp streaming/test_channel_metadata.cpp @@ -86,9 +86,9 @@ target_sources( test_shuffler_many_streams.cpp ) -add_executable(cudf_streaming_single_tests main/single.cpp) +add_executable(libcudf_streaming_single_tests main/single.cpp) set_target_properties( - cudf_streaming_single_tests + libcudf_streaming_single_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 20 @@ -98,17 +98,17 @@ set_target_properties( CUDA_STANDARD_REQUIRED ON ) target_include_directories( - cudf_streaming_single_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + libcudf_streaming_single_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( - cudf_streaming_single_tests + libcudf_streaming_single_tests PRIVATE cudf_streaming rapidsmpf::rapidsmpf GTest::gmock GTest::gtest - $ cudf_streaming_test_sources + $ libcudf_streaming_test_sources ) rapids_test_add( - NAME cudf_streaming_single_tests - COMMAND cudf_streaming_single_tests + NAME libcudf_streaming_single_tests + COMMAND libcudf_streaming_single_tests GPUS 1 PERCENT 100 INSTALL_COMPONENT_SET testing @@ -116,12 +116,12 @@ rapids_test_add( # ################################################################################################## # MPI and UCXX based tests ------------------------------------------------------------------------- -# These executables reuse cudf_streaming_test_sources but provide a different test environment main +# These executables reuse libcudf_streaming_test_sources but provide a different test environment main # (main/mpi.cpp / main/ucxx.cpp), and are launched via mpirun for multiple ranks. if(CUDF_STREAMING_HAVE_MPI) - add_executable(cudf_streaming_mpi_tests main/mpi.cpp) + add_executable(libcudf_streaming_mpi_tests main/mpi.cpp) set_target_properties( - cudf_streaming_mpi_tests + libcudf_streaming_mpi_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 20 @@ -131,20 +131,20 @@ if(CUDF_STREAMING_HAVE_MPI) CUDA_STANDARD_REQUIRED ON ) target_include_directories( - cudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + libcudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( - cudf_streaming_mpi_tests + libcudf_streaming_mpi_tests PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication GTest::gmock - GTest::gtest $ cudf_streaming_test_sources + GTest::gtest $ libcudf_streaming_test_sources ) - cudf_streaming_mpirun_test_add(TEST_TARGET cudf_streaming_mpi_tests) + libcudf_streaming_mpirun_test_add(TEST_TARGET libcudf_streaming_mpi_tests) if(CUDF_STREAMING_HAVE_UCXX) - add_executable(cudf_streaming_ucxx_tests main/ucxx.cpp) + add_executable(libcudf_streaming_mpi_tests main/ucxx.cpp) set_target_properties( - cudf_streaming_ucxx_tests + libcudf_streaming_mpi_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 20 @@ -154,11 +154,11 @@ if(CUDF_STREAMING_HAVE_MPI) CUDA_STANDARD_REQUIRED ON ) target_include_directories( - cudf_streaming_ucxx_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + libcudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( - cudf_streaming_ucxx_tests + libcudf_streaming_mpi_tests PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication @@ -166,14 +166,14 @@ if(CUDF_STREAMING_HAVE_MPI) GTest::gmock GTest::gtest $ - cudf_streaming_test_sources + libcudf_streaming_test_sources ) - cudf_streaming_mpirun_test_add(TEST_TARGET cudf_streaming_ucxx_tests) + libcudf_streaming_mpirun_test_add(TEST_TARGET libcudf_streaming_mpi_tests) else() - cudf_streaming_skip_optional_target(cudf_streaming_ucxx_tests "UCXX not found") + cudf_streaming_skip_optional_target(libcudf_streaming_mpi_tests "UCXX not found") endif() else() - cudf_streaming_skip_optional_target(cudf_streaming_mpi_tests "MPI not found") + cudf_streaming_skip_optional_target(libcudf_streaming_mpi_tests "MPI not found") endif() rapids_test_install_relocatable( From a2703d53e3e682fc44017d31b24fc4a254bf599f Mon Sep 17 00:00:00 2001 From: Niranda Perera Date: Tue, 16 Jun 2026 12:30:11 -0700 Subject: [PATCH 09/21] Fix include directory formatting in CMakeLists.txt --- cpp/libcudf_streaming/tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 27c51ad3f276..5b6038f0af8d 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -132,7 +132,7 @@ if(CUDF_STREAMING_HAVE_MPI) ) target_include_directories( libcudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( libcudf_streaming_mpi_tests @@ -155,7 +155,7 @@ if(CUDF_STREAMING_HAVE_MPI) ) target_include_directories( libcudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( libcudf_streaming_mpi_tests From 2adc3d83d4ce748f32098ae5e2998f81e74a9624 Mon Sep 17 00:00:00 2001 From: Niranda Perera Date: Tue, 16 Jun 2026 12:30:52 -0700 Subject: [PATCH 10/21] Update CMakeLists.txt --- cpp/libcudf_streaming/tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 5b6038f0af8d..45e1c54a2863 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -58,7 +58,7 @@ set_target_properties( ) target_include_directories( libcudf_streaming_test_sources PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( libcudf_streaming_test_sources @@ -99,7 +99,7 @@ set_target_properties( ) target_include_directories( libcudf_streaming_single_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( libcudf_streaming_single_tests From 64f891869b66ef7c4a63f2e2a6a65e3341e45f9e Mon Sep 17 00:00:00 2001 From: Niranda Perera Date: Tue, 16 Jun 2026 14:02:11 -0700 Subject: [PATCH 11/21] Fix comment formatting in CMakeLists.txt --- cpp/libcudf_streaming/tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 45e1c54a2863..b0a2dccb18c8 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -116,8 +116,8 @@ rapids_test_add( # ################################################################################################## # MPI and UCXX based tests ------------------------------------------------------------------------- -# These executables reuse libcudf_streaming_test_sources but provide a different test environment main -# (main/mpi.cpp / main/ucxx.cpp), and are launched via mpirun for multiple ranks. +# These executables reuse libcudf_streaming_test_sources but provide a different test environment +# main (main/mpi.cpp / main/ucxx.cpp), and are launched via mpirun for multiple ranks. if(CUDF_STREAMING_HAVE_MPI) add_executable(libcudf_streaming_mpi_tests main/mpi.cpp) set_target_properties( From 7e91b7374b9855107ff6f9ba987316b8a8b8ae37 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Tue, 16 Jun 2026 14:22:58 -0700 Subject: [PATCH 12/21] fix cmake Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 9612244b9f12..ed18791257df 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -146,9 +146,9 @@ if(CUDF_STREAMING_HAVE_MPI) libcudf_streaming_mpirun_test_add(TEST_TARGET libcudf_streaming_mpi_tests) if(CUDF_STREAMING_HAVE_UCXX) - add_executable(libcudf_streaming_mpi_tests main/ucxx.cpp) + add_executable(libcudf_streaming_ucxx_tests main/ucxx.cpp) set_target_properties( - libcudf_streaming_mpi_tests + libcudf_streaming_ucxx_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CUDF_STREAMING_BINARY_DIR}/gtests" INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 20 @@ -158,11 +158,11 @@ if(CUDF_STREAMING_HAVE_MPI) CUDA_STANDARD_REQUIRED ON ) target_include_directories( - libcudf_streaming_mpi_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" + libcudf_streaming_ucxx_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( - libcudf_streaming_mpi_tests + libcudf_streaming_ucxx_tests PRIVATE cudf_streaming rapidsmpf::rapidsmpf cudf_streaming::optional_communication @@ -172,9 +172,9 @@ if(CUDF_STREAMING_HAVE_MPI) $ libcudf_streaming_test_sources ) - libcudf_streaming_mpirun_test_add(TEST_TARGET libcudf_streaming_mpi_tests) + libcudf_streaming_mpirun_test_add(TEST_TARGET libcudf_streaming_ucxx_tests) else() - cudf_streaming_skip_optional_target(libcudf_streaming_mpi_tests "UCXX not found") + cudf_streaming_skip_optional_target(libcudf_streaming_ucxx_tests "UCXX not found") endif() else() cudf_streaming_skip_optional_target(libcudf_streaming_mpi_tests "MPI not found") From fbc93c36a9e244881a338941d2d7d429b733e307 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Tue, 16 Jun 2026 14:30:43 -0700 Subject: [PATCH 13/21] cmake style Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index ed18791257df..b712a26b3e56 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -159,7 +159,7 @@ if(CUDF_STREAMING_HAVE_MPI) ) target_include_directories( libcudf_streaming_ucxx_tests PRIVATE "${CUDF_STREAMING_SOURCE_DIR}/include" - "${CMAKE_CURRENT_SOURCE_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}" ) target_link_libraries( libcudf_streaming_ucxx_tests From 8d8037ddf3540e3361f0807cafb53065572a56f8 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Tue, 16 Jun 2026 15:08:34 -0700 Subject: [PATCH 14/21] fix cmake Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index b712a26b3e56..735dbfd03336 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -61,7 +61,7 @@ target_include_directories( "${CMAKE_CURRENT_SOURCE_DIR}" ) target_compile_options( - cudf_streaming_test_sources + libcudf_streaming_test_sources PRIVATE $<$:${CUDF_CUDA_FLAGS};--expt-extended-lambda> ) target_link_libraries( From 934cb958d56092c367b09745e0cf54d53395dc1b Mon Sep 17 00:00:00 2001 From: niranda perera Date: Tue, 16 Jun 2026 15:46:30 -0700 Subject: [PATCH 15/21] precommit Signed-off-by: niranda perera --- .../cmake/ConfigureOptionalCommunication.cmake | 2 +- cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake | 2 +- cpp/libcudf_streaming/tests/CMakeLists.txt | 2 +- cpp/libcudf_streaming/tests/environment.hpp | 2 +- cpp/libcudf_streaming/tests/main/mpi.cpp | 2 +- cpp/libcudf_streaming/tests/main/single.cpp | 2 +- cpp/libcudf_streaming/tests/main/ucxx.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake index ad5d5aab65d2..546a556616b0 100644 --- a/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake +++ b/cpp/libcudf_streaming/cmake/ConfigureOptionalCommunication.cmake @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= diff --git a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake index ec34b3fa9545..dc147d39cfda 100644 --- a/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake +++ b/cpp/libcudf_streaming/cmake/thirdparty/get_cudf.cmake @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= diff --git a/cpp/libcudf_streaming/tests/CMakeLists.txt b/cpp/libcudf_streaming/tests/CMakeLists.txt index 735dbfd03336..626ef35b906e 100644 --- a/cpp/libcudf_streaming/tests/CMakeLists.txt +++ b/cpp/libcudf_streaming/tests/CMakeLists.txt @@ -1,6 +1,6 @@ # ============================================================================= # cmake-format: off -# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # cmake-format: on # ============================================================================= diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index f8507701578b..a69a18dfa78c 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * reserved. SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/libcudf_streaming/tests/main/mpi.cpp b/cpp/libcudf_streaming/tests/main/mpi.cpp index c8225747af22..ecfc4ce1cb12 100644 --- a/cpp/libcudf_streaming/tests/main/mpi.cpp +++ b/cpp/libcudf_streaming/tests/main/mpi.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * reserved. SPDX-License-Identifier: Apache-2.0 */ diff --git a/cpp/libcudf_streaming/tests/main/single.cpp b/cpp/libcudf_streaming/tests/main/single.cpp index 272a73a14070..cfc5f585f7b5 100644 --- a/cpp/libcudf_streaming/tests/main/single.cpp +++ b/cpp/libcudf_streaming/tests/main/single.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * reserved. SPDX-License-Identifier: Apache-2.0 */ diff --git a/cpp/libcudf_streaming/tests/main/ucxx.cpp b/cpp/libcudf_streaming/tests/main/ucxx.cpp index 35f2ff3187d3..e6179752a7f4 100644 --- a/cpp/libcudf_streaming/tests/main/ucxx.cpp +++ b/cpp/libcudf_streaming/tests/main/ucxx.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * reserved. SPDX-License-Identifier: Apache-2.0 */ From 11ead0696ac52e69ef9d31d76966d3f0d4c37a3e Mon Sep 17 00:00:00 2001 From: niranda perera Date: Tue, 16 Jun 2026 15:49:54 -0700 Subject: [PATCH 16/21] percommit Signed-off-by: niranda perera --- cpp/libcudf_streaming/tests/environment.hpp | 7 ++++--- cpp/libcudf_streaming/tests/main/single.cpp | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cpp/libcudf_streaming/tests/environment.hpp b/cpp/libcudf_streaming/tests/environment.hpp index a69a18dfa78c..2a16d482fc0c 100644 --- a/cpp/libcudf_streaming/tests/environment.hpp +++ b/cpp/libcudf_streaming/tests/environment.hpp @@ -1,7 +1,8 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * reserved. SPDX-License-Identifier: Apache-2.0 +/* + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 */ + #pragma once #include diff --git a/cpp/libcudf_streaming/tests/main/single.cpp b/cpp/libcudf_streaming/tests/main/single.cpp index cfc5f585f7b5..cf54b83eca5a 100644 --- a/cpp/libcudf_streaming/tests/main/single.cpp +++ b/cpp/libcudf_streaming/tests/main/single.cpp @@ -1,6 +1,6 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * reserved. SPDX-License-Identifier: Apache-2.0 +/* + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-License-Identifier: Apache-2.0 */ #include "../environment.hpp" From cfe66a8f740b35c70adc0fedf9b35f393e11b55f Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 22 Jun 2026 11:56:29 -0700 Subject: [PATCH 17/21] Trigger Build From c2f7ecb9c2cf43796d3a7e5588059d4e620c7e26 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 22 Jun 2026 12:20:53 -0700 Subject: [PATCH 18/21] attempting to fix numpy lint error --- python/cudf/cudf/pandas/_wrappers/numpy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/cudf/cudf/pandas/_wrappers/numpy.py b/python/cudf/cudf/pandas/_wrappers/numpy.py index eb9aa5301004..c737b7546177 100644 --- a/python/cudf/cudf/pandas/_wrappers/numpy.py +++ b/python/cudf/cudf/pandas/_wrappers/numpy.py @@ -326,9 +326,11 @@ def _ndarray_fsproxy_fast_to_slow(self): if version.parse(numpy.__version__) >= version.parse("2.0"): # NumPy 2 introduced `_core` and gives warnings for access to `core`. - from numpy._core.multiarray import flagsobj as _numpy_flagsobj + from numpy._core.multiarray import flagsobj else: - from numpy.core.multiarray import flagsobj as _numpy_flagsobj + from numpy.core.multiarray import flagsobj + +_numpy_flagsobj = flagsobj # Mapping flags between slow and fast types _ndarray_flags = make_intermediate_proxy_type( From 2171a277bc9c912632dbe2f7260b2b7484e510a6 Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 22 Jun 2026 12:33:49 -0700 Subject: [PATCH 19/21] Revert "attempting to fix numpy lint error" & adding pre-commit clean This reverts commit c2f7ecb9c2cf43796d3a7e5588059d4e620c7e26. Signed-off-by: niranda perera --- ci/check_style.sh | 1 + python/cudf/cudf/pandas/_wrappers/numpy.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/check_style.sh b/ci/check_style.sh index 682d00e142c6..3843c5573fcf 100755 --- a/ci/check_style.sh +++ b/ci/check_style.sh @@ -28,4 +28,5 @@ mkdir -p "$(dirname "${RAPIDS_CMAKE_FORMAT_FILE}")" wget -O ${RAPIDS_CMAKE_FORMAT_FILE} "${FORMAT_FILE_URL}" # Run pre-commit checks +pre-commit clean pre-commit run --all-files --show-diff-on-failure diff --git a/python/cudf/cudf/pandas/_wrappers/numpy.py b/python/cudf/cudf/pandas/_wrappers/numpy.py index c737b7546177..eb9aa5301004 100644 --- a/python/cudf/cudf/pandas/_wrappers/numpy.py +++ b/python/cudf/cudf/pandas/_wrappers/numpy.py @@ -326,11 +326,9 @@ def _ndarray_fsproxy_fast_to_slow(self): if version.parse(numpy.__version__) >= version.parse("2.0"): # NumPy 2 introduced `_core` and gives warnings for access to `core`. - from numpy._core.multiarray import flagsobj + from numpy._core.multiarray import flagsobj as _numpy_flagsobj else: - from numpy.core.multiarray import flagsobj - -_numpy_flagsobj = flagsobj + from numpy.core.multiarray import flagsobj as _numpy_flagsobj # Mapping flags between slow and fast types _ndarray_flags = make_intermediate_proxy_type( From 41bb34ede7d549a4b1c54b01ca30caefa33b4c3a Mon Sep 17 00:00:00 2001 From: niranda perera Date: Mon, 22 Jun 2026 12:46:10 -0700 Subject: [PATCH 20/21] run precommit AGAIN! Signed-off-by: niranda perera --- ci/check_style.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/check_style.sh b/ci/check_style.sh index 3843c5573fcf..785217419e3c 100755 --- a/ci/check_style.sh +++ b/ci/check_style.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 set -euo pipefail From 55851a010ecb05c3f603bb2e37daecddc561b8a7 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 23 Jun 2026 10:11:02 -0700 Subject: [PATCH 21/21] Fix conda recipe test: use renamed libcudf_streaming_single_tests binary --- conda/recipes/libcudf/recipe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/libcudf/recipe.yaml b/conda/recipes/libcudf/recipe.yaml index 060917b7ad6c..ecdb400b900a 100644 --- a/conda/recipes/libcudf/recipe.yaml +++ b/conda/recipes/libcudf/recipe.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 schema_version: 1 @@ -437,7 +437,7 @@ outputs: - libnvcomp tests: - script: - - test -f $PREFIX/bin/gtests/libcudf_streaming/cudf_streaming_single_tests + - test -f $PREFIX/bin/gtests/libcudf_streaming/libcudf_streaming_single_tests - test -f $PREFIX/bin/libcudf_streaming_bench_pack - test -f $PREFIX/bin/libcudf_streaming_bench_partition - test -f $PREFIX/bin/libcudf_streaming_bench_ndsh_bench_read