Skip to content

Commit ce70f6f

Browse files
authored
Merge branch 'main' into feature/sparse-page-io-hybrid
2 parents b3be4bf + 3b3cea4 commit ce70f6f

49 files changed

Lines changed: 1360 additions & 513 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ jobs:
422422
with:
423423
build_type: pull-request
424424
script: ci/test_cpp.sh
425+
# https://github.com/rapidsai/cudf/issues/23498
426+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
425427
conda-python-build:
426428
needs: conda-cpp-build
427429
permissions:
@@ -465,6 +467,8 @@ jobs:
465467
with:
466468
build_type: pull-request
467469
script: "ci/test_python_cudf.sh"
470+
# https://github.com/rapidsai/cudf/issues/23498
471+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
468472
conda-python-other-tests:
469473
# Tests for dask_cudf, cudf_polars, custreamz, cudf_kafka are separated for CI parallelism
470474
needs: [conda-python-build-noarch, changed-files]
@@ -482,6 +486,8 @@ jobs:
482486
# https://github.com/rapidsai/cudf/pull/22381/changes#r3196736965
483487
container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000"
484488
script: "ci/test_python_other.sh"
489+
# https://github.com/rapidsai/cudf/issues/23498
490+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
485491
conda-java-tests:
486492
needs: [conda-cpp-build, changed-files]
487493
permissions:
@@ -601,6 +607,8 @@ jobs:
601607
with:
602608
build_type: pull-request
603609
script: ci/test_wheel_cudf_streaming.sh
610+
# https://github.com/rapidsai/cudf/issues/23498
611+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
604612
wheel-build-pylibcudf:
605613
needs: [checks, wheel-build-libcudf]
606614
permissions:
@@ -651,6 +659,8 @@ jobs:
651659
with:
652660
build_type: pull-request
653661
script: ci/test_wheel_cudf.sh
662+
# https://github.com/rapidsai/cudf/issues/23498
663+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
654664
wheel-build-cudf-polars:
655665
needs: wheel-build-pylibcudf
656666
permissions:
@@ -775,7 +785,8 @@ jobs:
775785
if: (fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cudf_pandas) && fromJSON(needs.changed-files.outputs.changed_file_groups).neither_cudf_polars_nor_dask_cudf
776786
with:
777787
# This selects the latest supported Python + CUDA minor versions for each ARCH/CUDA major version combo
778-
matrix_filter: group_by([(.ARCH), (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
788+
# Filter out GB300 due to https://github.com/rapidsai/cudf/issues/23498
789+
matrix_filter: group_by([(.ARCH), (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) | map(select(.GPU != "gb300" and .GPU != "gh200"))
779790
build_type: pull-request
780791
script: ci/cudf_pandas_scripts/run_tests.sh
781792
third-party-integration-tests-cudf-pandas:

.github/workflows/test.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
date: ${{ inputs.date }}
5555
script: ci/test_cpp.sh
5656
sha: ${{ inputs.sha }}
57+
# https://github.com/rapidsai/cudf/issues/23498
58+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
5759
conda-cpp-benchmark-tests:
5860
permissions:
5961
actions: read
@@ -121,6 +123,8 @@ jobs:
121123
date: ${{ inputs.date }}
122124
sha: ${{ inputs.sha }}
123125
script: "ci/test_python_cudf.sh"
126+
# https://github.com/rapidsai/cudf/issues/23498
127+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
124128
conda-python-other-tests:
125129
# Tests for dask_cudf, custreamz, cudf_kafka are separated for CI parallelism
126130
permissions:
@@ -137,6 +141,8 @@ jobs:
137141
date: ${{ inputs.date }}
138142
sha: ${{ inputs.sha }}
139143
script: "ci/test_python_other.sh"
144+
# https://github.com/rapidsai/cudf/issues/23498
145+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
140146
conda-java-tests:
141147
permissions:
142148
actions: read
@@ -218,6 +224,8 @@ jobs:
218224
date: ${{ inputs.date }}
219225
sha: ${{ inputs.sha }}
220226
script: ci/cudf_pandas_scripts/run_tests.sh
227+
# https://github.com/rapidsai/cudf/issues/23498
228+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
221229
third-party-integration-tests-cudf-pandas:
222230
permissions:
223231
actions: read
@@ -271,6 +279,8 @@ jobs:
271279
date: ${{ inputs.date }}
272280
sha: ${{ inputs.sha }}
273281
script: "ci/test_wheel_cudf_polars.sh"
282+
# https://github.com/rapidsai/cudf/issues/23498
283+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
274284
cudf-polars-polars-tests:
275285
permissions:
276286
actions: read
@@ -286,6 +296,8 @@ jobs:
286296
date: ${{ inputs.date }}
287297
sha: ${{ inputs.sha }}
288298
script: "ci/test_cudf_polars_polars_tests.sh"
299+
# https://github.com/rapidsai/cudf/issues/23498
300+
matrix_filter: map(select(.GPU != "gb300" and .GPU != "gh200"))
289301
narwhals-tests:
290302
permissions:
291303
actions: read

cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ the null masks of both struct fields.
15781578
## Dictionary columns
15791579

15801580
Dictionaries provide an efficient way to represent low-cardinality data by storing a single copy
1581-
of each value. A dictionary comprises a column of distinct keys and a column containing an index into
1581+
of each value. A dictionary comprises a column of keys and a column containing an index into
15821582
the keys column for each row of the parent column. The keys column may have any fixed-width data_type
15831583
or STRING data_type. The indices represent the corresponding positions of each
15841584
element's value in the keys. The indices child column can have any signed integer type
@@ -1589,8 +1589,11 @@ input column will produce equivalent dictionary columns but the keys may be in a
15891589
and therefore the indices will not match as well. Using `cudf::dictionary::decode()` on both dictionary
15901590
columns should produce the same result.
15911591

1592-
Although `cudf::make_dictionary_column()` expects distinct keys, the API does not enforce this constraint.
1593-
Using a dictionary column with non-distinct keys in libcudf APIs may result in undefined behavior.
1592+
The libcudf APIs also accept dictionary columns with non-unique keys.
1593+
However, output dictionary columns will generally contain unique keys in an unspecified order.
1594+
The exceptions are `cudf::make_dictionary_column()`, which accepts keys and indices without
1595+
changing them, and `cudf::dictionary::set_keys()`, which strictly honors the given keys
1596+
(both order and duplicates).
15941597

15951598
## Nested column challenges
15961599

cpp/include/cudf/column/column_device_view.cuh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
#pragma once
@@ -11,10 +11,12 @@
1111
#include <cudf/strings/strings_column_view.hpp>
1212
#include <cudf/structs/struct_view.hpp>
1313
#include <cudf/utilities/default_stream.hpp>
14+
#include <cudf/utilities/memory_resource.hpp>
1415
#include <cudf/utilities/span.hpp>
1516
#include <cudf/utilities/type_dispatcher.hpp>
1617

1718
#include <rmm/cuda_stream_view.hpp>
19+
#include <rmm/resource_ref.hpp>
1820

1921
#include <cuda/iterator>
2022
#include <cuda/std/utility>
@@ -498,11 +500,14 @@ class alignas(16) column_device_view : public column_device_view_core {
498500
*
499501
* @param source_view The `column_view` to make usable in device code
500502
* @param stream CUDA stream used for device memory operations for children columns.
503+
* @param mr Device memory resource used to allocate the returned child-view storage
501504
* @return A `unique_ptr` to a `column_device_view` that makes the data from
502505
*`source_view` available in device memory.
503506
*/
504507
static std::unique_ptr<column_device_view, std::function<void(column_device_view*)>> create(
505-
column_view source_view, rmm::cuda_stream_view stream = cudf::get_default_stream());
508+
column_view source_view,
509+
rmm::cuda_stream_view stream = cudf::get_default_stream(),
510+
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());
506511

507512
/**
508513
* @brief Destroy the `column_device_view` object.
@@ -645,13 +650,15 @@ class alignas(16) mutable_column_device_view : public mutable_column_device_view
645650
*
646651
* @param source_view The `column_view` to make usable in device code
647652
* @param stream CUDA stream used for device memory operations for children columns.
653+
* @param mr Device memory resource used to allocate the returned child-view storage
648654
* @return A `unique_ptr` to a `mutable_column_device_view` that makes the
649655
* data from `source_view` available in device memory.
650656
*/
651657
static std::unique_ptr<mutable_column_device_view,
652658
std::function<void(mutable_column_device_view*)>>
653659
create(mutable_column_view source_view,
654-
rmm::cuda_stream_view stream = cudf::get_default_stream());
660+
rmm::cuda_stream_view stream = cudf::get_default_stream(),
661+
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());
655662

656663
/**
657664
* @brief Returns reference to element at the specified index.

cpp/include/cudf/detail/row_operator/lexicographic.cuh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,10 @@ struct less_equivalent_comparator
677677
*
678678
*/
679679
struct preprocessed_table {
680-
using table_device_view_owner =
681-
std::invoke_result_t<decltype(table_device_view::create), table_view, rmm::cuda_stream_view>;
680+
using table_device_view_owner = std::invoke_result_t<decltype(table_device_view::create),
681+
table_view,
682+
rmm::cuda_stream_view,
683+
rmm::device_async_resource_ref>;
682684

683685
/**
684686
* @brief Preprocess table for use with lexicographical comparison

cpp/include/cudf/detail/row_operator/preprocessed_table.cuh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -68,8 +68,10 @@ struct preprocessed_table {
6868
template <template <typename> class Hash>
6969
friend class ::cudf::detail::row::primitive::row_hasher;
7070

71-
using table_device_view_owner =
72-
std::invoke_result_t<decltype(table_device_view::create), table_view, rmm::cuda_stream_view>;
71+
using table_device_view_owner = std::invoke_result_t<decltype(table_device_view::create),
72+
table_view,
73+
rmm::cuda_stream_view,
74+
rmm::device_async_resource_ref>;
7375

7476
preprocessed_table(table_device_view_owner&& table,
7577
std::vector<rmm::device_buffer>&& null_buffers,

cpp/include/cudf/dictionary/dictionary_column_view.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ namespace CUDF_EXPORT cudf {
2222
* @brief A wrapper class for operations on a dictionary column.
2323
*
2424
* A dictionary column contains a set of keys and a column of indices.
25-
* The keys are a sorted set of unique values for the column.
25+
* The keys are not required to be unique.
26+
*
2627
* The indices represent the corresponding positions of each element's
2728
* value in the keys.
2829
*/

cpp/include/cudf/dictionary/dictionary_factories.hpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ namespace CUDF_EXPORT cudf {
2626
* @brief Construct a dictionary column by copying the provided `keys`
2727
* and `indices`.
2828
*
29-
* It is expected that `keys_column.has_nulls() == false`.
30-
* It is assumed the elements in `keys_column` are unique and
31-
* are in a strict, total order. Meaning, `keys_column[i]` is ordered before
32-
* `keys_column[i+1]` for all `i in [0,n-1)` where `n` is the number of keys.
29+
* The keys_column must contain no nulls.
3330
*
3431
* The indices values must be in the range [0,keys_column.size()).
3532
*
@@ -49,7 +46,7 @@ namespace CUDF_EXPORT cudf {
4946
* @throw std::invalid_argument if keys_column contains nulls
5047
* @throw std::invalid_argument if indices_column type is not a signed integer
5148
*
52-
* @param keys_column Column of unique, ordered values to use as the new dictionary column's keys.
49+
* @param keys_column Column of non-null values to use as the new dictionary column's keys.
5350
* @param indices_column Indices to use for the new dictionary column.
5451
* @param stream CUDA stream used for device memory operations and kernel launches.
5552
* @param mr Device memory resource used to allocate the returned column's device memory.
@@ -66,16 +63,12 @@ std::unique_ptr<column> make_dictionary_column(
6663
* and indices columns.
6764
*
6865
* The keys_column and indices columns must contain no nulls.
69-
* It is assumed the elements in `keys_column` are unique and
70-
* are in a strict, total order. Meaning, `keys_column[i]` is ordered before
71-
* `keys_column[i+1]` for all `i in [0,n-1)` where `n` is the number of keys.
72-
*
7366
* The indices values must be in the range [0,keys_column.size()).
7467
*
7568
* @throw std::invalid_argument if keys_column or indices_column contains nulls
7669
* @throw std::invalid_argument if indices_column type is not a signed integer type
7770
*
78-
* @param keys_column Column of unique, ordered values to use as the new dictionary column's keys.
71+
* @param keys_column Column of non-null values to use as the new dictionary column's keys.
7972
* @param indices_column Indices to use for the new dictionary column.
8073
* @param null_mask Null mask for the output column.
8174
* @param null_count Number of nulls for the output column.
@@ -101,7 +94,7 @@ std::unique_ptr<column> make_dictionary_column(std::unique_ptr<column> keys_colu
10194
*
10295
* @throw cudf::logic_error if keys_column contains nulls
10396
*
104-
* @param keys_column Column of unique, ordered values to use as the new dictionary column's keys.
97+
* @param keys_column Column of non-null values to use as the new dictionary column's keys.
10598
* @param indices_column Indices values and null-mask to use for the new dictionary column.
10699
* @param stream CUDA stream used for device memory operations and kernel launches.
107100
* @param mr Device memory resource used to allocate the returned column's device memory.

cpp/include/cudf/dictionary/update_keys.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ std::unique_ptr<column> remove_unused_keys(
121121
* The indices are updated to reflect the position values of the new keys.
122122
* Any indices pointing to removed keys sets those rows to null.
123123
*
124+
* Although duplicate keys are allowed, indices in the returned dictionary may
125+
* only reference one of the duplicates.
126+
*
124127
* @code{.pseudo}
125128
* d1 = {keys=["a", "b", "c"], indices=[2, 0, 1, 2, 1]}
126129
* d2 = set_keys(existing_dict, ["b","c","d"])

cpp/include/cudf/reduction/detail/reduction_functions.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,14 @@ std::unique_ptr<scalar> max(column_view const& col,
107107
* If all elements in input column are null, output scalar is null.
108108
*
109109
* @param col input column to compute reduction
110+
* @param dispatch_type The type to dispatch on. For dictionary columns this must be the keys type;
111+
* for all other columns it must equal `col.type()`.
110112
* @param stream CUDA stream used for device memory operations and kernel launches
111113
* @param mr Device memory resource used to allocate the returned scalar's device memory
112114
* @return Index of the minimum element as scalar of type `output_dtype`
113115
*/
114116
std::unique_ptr<scalar> argmin(column_view const& col,
117+
data_type dispatch_type,
115118
rmm::cuda_stream_view stream,
116119
rmm::device_async_resource_ref mr);
117120

@@ -121,11 +124,14 @@ std::unique_ptr<scalar> argmin(column_view const& col,
121124
* If all elements in input column are null, output scalar is null.
122125
*
123126
* @param col input column to compute reduction
127+
* @param dispatch_type The type to dispatch on. For dictionary columns this must be the keys type;
128+
* for all other columns it must equal `col.type()`.
124129
* @param stream CUDA stream used for device memory operations and kernel launches
125130
* @param mr Device memory resource used to allocate the returned scalar's device memory
126131
* @return Index of the maximum element as scalar of type `output_dtype`
127132
*/
128133
std::unique_ptr<scalar> argmax(column_view const& col,
134+
data_type dispatch_type,
129135
rmm::cuda_stream_view stream,
130136
rmm::device_async_resource_ref mr);
131137

0 commit comments

Comments
 (0)