Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f0234e9
Disable large-memory join extent overflow tests
PointKernel Nov 3, 2026
d3931f3
Run disabled large-memory join tests in nightlies on large GPUs
PointKernel Nov 3, 2026
5a94c12
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 3, 2026
090325b
Simplify nightly large-memory test step
PointKernel Nov 3, 2026
26c0dd9
Add a timeout to the nightly large-memory test step
PointKernel Nov 3, 2026
25939ec
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 4, 2026
66d2171
Skip large-memory tests unless enabled and the device is big enough
PointKernel Nov 4, 2026
35e4b84
Clone RMM byte literals and rename the skip macro to say it skips
PointKernel Nov 5, 2026
673ccd3
Lower the split test memory requirements measured with the async allo…
PointKernel Nov 5, 2026
54d8d0f
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 5, 2026
8adab91
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 5, 2026
dc0c08e
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 5, 2026
e9f3c8c
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 6, 2026
f0d517d
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 6, 2026
8e6f77f
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 7, 2026
e20e98b
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 8, 2026
57a65e8
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 9, 2026
f315f41
Merge branch 'main' into disable-large-extent-join-tests
PointKernel Nov 9, 2026
40aa38c
Merge branch 'main' into disable-large-extent-join-tests
vyasr Nov 9, 2026
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
5 changes: 5 additions & 0 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ EXITCODE=0
trap "EXITCODE=1" ERR
set +e

# Run the large-memory tests (skipped by default) in nightlies; they skip themselves on small GPUs
if [[ "${RAPIDS_BUILD_TYPE:-}" == "nightly" ]]; then
export GTEST_CUDF_LARGE_MEMORY_TESTS=1
fi

# Run gtests from the libcudf-tests and libcudf-streaming-tests packages
export GTEST_OUTPUT=xml:${RAPIDS_TESTS_DIR}/

Expand Down
15 changes: 15 additions & 0 deletions cpp/include/cudf_test/byte_literals.hpp
Comment thread
PointKernel marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#include <cstddef>

namespace cudf::test::literals {

constexpr std::size_t operator""_MiB(unsigned long long val) { return val << 20; }
constexpr std::size_t operator""_GiB(unsigned long long val) { return val << 30; }

} // namespace cudf::test::literals
52 changes: 52 additions & 0 deletions cpp/include/cudf_test/large_memory.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/

#pragma once

#include <cudf/utilities/error.hpp>

#include <cuda_runtime_api.h>

#include <gtest/gtest.h>

#include <cstddef>
#include <cstdlib>
#include <string>

namespace cudf::test {

/**
* @brief Returns why a test needing `bytes` of device memory should be skipped, or an empty string
* if it can run.
*
* Large-memory tests are skipped unless `GTEST_CUDF_LARGE_MEMORY_TESTS=1`, and then only run if
* the current CUDA device has at least `bytes` of total memory.
*/
inline std::string large_memory_skip_reason(std::size_t bytes)
{
auto const* env = std::getenv("GTEST_CUDF_LARGE_MEMORY_TESTS");
if (env == nullptr or std::string{env} != "1") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you think this should allow an option like "FORCE" so that we try to run the tests even on small memory GPUs?

return "Large-memory tests are disabled, set GTEST_CUDF_LARGE_MEMORY_TESTS=1 to enable";
}
std::size_t free{};
std::size_t total{};
CUDF_CUDA_TRY(cudaMemGetInfo(&free, &total));
if (total < bytes) {
return "Requires " + std::to_string(bytes >> 20) +
" MiB of device memory, but the device has " + std::to_string(total >> 20) + " MiB";
}
return {};
}

} // namespace cudf::test

/// Skips the current test unless large-memory tests are enabled and the device has `bytes` memory.
#define CUDF_TEST_REQUIRE_DEVICE_MEMORY(bytes) \
Comment thread
PointKernel marked this conversation as resolved.
Resolved
do { \
if (auto const skip_reason_ = cudf::test::large_memory_skip_reason(bytes); \
not skip_reason_.empty()) { \
GTEST_SKIP() << skip_reason_; \
} \
} while (0)
17 changes: 11 additions & 6 deletions cpp/tests/copying/split_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
#include <tests/copying/slice_tests.cuh>

#include <cudf_test/base_fixture.hpp>
#include <cudf_test/byte_literals.hpp>
#include <cudf_test/column_utilities.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/iterator_utilities.hpp>
#include <cudf_test/large_memory.hpp>
#include <cudf_test/table_utilities.hpp>
#include <cudf_test/type_list_utilities.hpp>
#include <cudf_test/type_lists.hpp>
Expand Down Expand Up @@ -1776,30 +1778,33 @@ TEST_F(ContiguousSplitUntypedTest, ManyBuffersPreserveValidity)
CUDF_TEST_EXPECT_TABLES_EQUAL(input, result.back().table);
}

// This test requires about 25GB of device memory when used with the arena allocator
TEST_F(ContiguousSplitUntypedTest, DISABLED_VeryLargeColumnTest)
TEST_F(ContiguousSplitUntypedTest, VeryLargeColumnTest)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(25_GiB);
Comment thread
PointKernel marked this conversation as resolved.
Resolved
// tests an edge case where buf.elements * buf.element_size overflows an INT32.
auto col = cudf::make_fixed_width_column(
cudf::data_type{cudf::type_id::INT64}, 400 * 1024 * 1024, cudf::mask_state::UNALLOCATED);
auto result = cudf::contiguous_split(cudf::table_view{{*col}}, {});
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*col, result[0].table.column(0));
}

// This test requires about 25GB of device memory when used with the arena allocator
TEST_F(ContiguousSplitUntypedTest, DISABLED_VeryLargeColumnTestChunked)
TEST_F(ContiguousSplitUntypedTest, VeryLargeColumnTestChunked)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(25_GiB);
// tests an edge case where buf.elements * buf.element_size overflows an INT32.
auto col = cudf::make_fixed_width_column(
cudf::data_type{cudf::type_id::INT64}, 400 * 1024 * 1024, cudf::mask_state::UNALLOCATED);
auto result = do_chunked_pack(cudf::table_view{{*col}});
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*col, result[0].table.column(0));
}

// Disabled as this test requires about 7GB of device memory.
// See https://github.com/NVIDIA/cudf/issues/20876 for more info.
TEST_F(ContiguousSplitUntypedTest, DISABLED_ChunkedPackNextReturnValueOver2GB)
TEST_F(ContiguousSplitUntypedTest, ChunkedPackNextReturnValueOver2GB)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(7_GiB);
auto const mr = cudf::get_current_device_resource_ref();

// 270M INT64 elements = 270 * 1024 * 1024 * 8 = 2,264,924,160 bytes > INT32_MAX
Expand Down
4 changes: 4 additions & 0 deletions cpp/tests/join/distinct_join_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

#include <cudf_test/base_fixture.hpp>
#include <cudf_test/byte_literals.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/large_memory.hpp>
#include <cudf_test/table_utilities.hpp>

#include <cudf/column/column.hpp>
Expand Down Expand Up @@ -736,6 +738,8 @@ TEST_F(DistinctJoinTest, InvalidLoadFactor)

TEST_F(DistinctJoinTest, DistinctLargeExtentOverflowPrevention)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(24_GiB);
// Test that validates size_t extent can handle hash table sizes that would
// overflow int32_t extent when load_factor < 1.0

Expand Down
4 changes: 4 additions & 0 deletions cpp/tests/join/semi_anti_join_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
*/

#include <cudf_test/base_fixture.hpp>
#include <cudf_test/byte_literals.hpp>
#include <cudf_test/column_utilities.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/iterator_utilities.hpp>
#include <cudf_test/large_memory.hpp>
#include <cudf_test/table_utilities.hpp>

#include <cudf/column/column.hpp>
Expand Down Expand Up @@ -423,6 +425,8 @@ TEST_P(SemiAntiJoinTest, SemiJoinEmptyTables)

TEST_P(SemiAntiJoinTest, AntiSemiJoinLargeExtentOverflowPrevention)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(24_GiB);
auto const implementation = GetParam();
if (use_mark_join(implementation)) { GTEST_SKIP(); }
// Test validates size_t extent can handle bucket storage sizes that would
Expand Down
8 changes: 5 additions & 3 deletions cpp/tests/large_strings/bpe_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

#include <tests/text/bpe_data_generator.hpp>

#include <cudf_test/byte_literals.hpp>
#include <cudf_test/column_utilities.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/large_memory.hpp>

#include <cudf/column/column_factories.hpp>
#include <cudf/concatenate.hpp>
Expand Down Expand Up @@ -78,10 +80,10 @@ TEST_F(BPETest, LargeOutput)
}
}

// Disabled since this requires about 40GB of device memory.
// Run with --gtest_also_run_disabled_tests to verify more than max size_type segments.
TEST_F(BPETest, DISABLED_ManySegments)
TEST_F(BPETest, ManySegments)
{
using namespace cudf::test::literals;
CUDF_TEST_REQUIRE_DEVICE_MEMORY(40_GiB);
// every character is its own (unpairable) segment so the number
// of segments exceeds max size_type
auto const mpt = cudf::test::strings_column_wrapper({"a b", "ab c"});
Expand Down
Loading