Skip to content

Commit d56651c

Browse files
Merge branch 'main' into to_array
2 parents 459f191 + d24f770 commit d56651c

41 files changed

Lines changed: 597 additions & 573 deletions

Some content is hidden

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

.agents/skills/build-test-cudf-java/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.
5151
Export `MVN_COMMON_OPTS` to match the CI build configuration in `java/ci/build-in-docker.sh`. For example:
5252

5353
```bash
54-
export MVN_COMMON_OPTS="-DCUDF_CPP_BUILD_DIR=$CUDF_CPP_BUILD_DIR -DBUILD_SHARED_LIBS=OFF -DCUDF_USE_PER_THREAD_DEFAULT_STREAM=ON -DCUDA_STATIC_CUFILE=ON -DCUDA_STATIC_RUNTIME=ON -DCUDF_JNI_LIBCUDF_STATIC=ON"
54+
export MVN_COMMON_OPTS="-DCUDF_CPP_BUILD_DIR=$CUDF_CPP_BUILD_DIR -DBUILD_SHARED_LIBS=OFF -DCUDF_USE_PER_THREAD_DEFAULT_STREAM=ON -DCUDA_STATIC_CUFILE=ON -DCUDF_JNI_LIBCUDF_STATIC=ON"
5555
```
5656

5757
## Building cudf-java

.devcontainer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ ENV LIBCUDF_KERNEL_CACHE_PATH="/home/coder/cudf/cpp/build/${PYTHON_PACKAGE_MANAG
3737
###
3838
# sccache configuration
3939
###
40-
ENV AWS_ROLE_ARN="arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs"
40+
ENV AWS_IDP_URL="https://token.rapids.nvidia.com"
41+
ENV AWS_ROLE_ARN="arn:aws:iam::279114543810:role/rapids-token-sccache-devs"
4142
ENV SCCACHE_REGION="us-east-2"
4243
ENV SCCACHE_BUCKET="rapids-sccache-devs"
4344
ENV SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true

conda/recipes/cudf/recipe.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ requirements:
9898
- pylibcudf =${{ version }}
9999
- ${{ pin_compatible("rmm", upper_bound="x.x") }}
100100
- fsspec >=0.6.0
101-
- cuda-cudart
102101
- if: cuda_major == "12"
103102
then: cuda-python >=12.9.2,<13.0
104103
else: cuda-python >=13.0.1,<14.0

cpp/CMakeLists.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ option(CUDA_ENABLE_LINEINFO
5858
)
5959
option(CUDA_WARNINGS_AS_ERRORS "Enable -Werror=all-warnings for all CUDA compilation" ON)
6060

61-
# cudart can be statically linked or dynamically linked. The python ecosystem wants dynamic linking
62-
option(CUDA_STATIC_RUNTIME "Statically link the CUDA runtime" OFF)
63-
6461
set(DEFAULT_CUDF_BUILD_STREAMS_TEST_UTIL ON)
6562

6663
if(NOT BUILD_SHARED_LIBS)
@@ -97,7 +94,6 @@ message(
9794
VERBOSE
9895
"CUDF: Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler): ${CUDA_ENABLE_LINEINFO}"
9996
)
100-
message(VERBOSE "CUDF: Statically link the CUDA runtime: ${CUDA_STATIC_RUNTIME}")
10197
message(VERBOSE
10298
"CUDF: Build with remote IO (e.g. AWS S3) support through KvikIO: ${CUDF_KVIKIO_REMOTE_IO}"
10399
)
@@ -1012,7 +1008,7 @@ if(TARGET conda_env)
10121008
target_link_libraries(cudf PRIVATE conda_env)
10131009
endif()
10141010

1015-
rapids_cuda_set_runtime(cudf USE_STATIC ${CUDA_STATIC_RUNTIME})
1011+
rapids_cuda_set_runtime(cudf USE_STATIC ON)
10161012

10171013
file(
10181014
WRITE "${CUDF_BINARY_DIR}/fatbin.ld"
@@ -1059,7 +1055,7 @@ if(CUDF_BUILD_TESTUTIL)
10591055
PUBLIC cudf
10601056
PRIVATE $<TARGET_NAME_IF_EXISTS:conda_env>
10611057
)
1062-
rapids_cuda_set_runtime(cudftest_default_stream USE_STATIC ${CUDA_STATIC_RUNTIME})
1058+
rapids_cuda_set_runtime(cudftest_default_stream USE_STATIC ON)
10631059

10641060
add_library(cudf::cudftest_default_stream ALIAS cudftest_default_stream)
10651061

@@ -1090,7 +1086,7 @@ if(CUDF_BUILD_TESTUTIL)
10901086
cudftestutil INTERFACE "$<BUILD_INTERFACE:${CUDF_SOURCE_DIR}>"
10911087
"$<BUILD_INTERFACE:${CUDF_SOURCE_DIR}/src>"
10921088
)
1093-
rapids_cuda_set_runtime(cudftestutil USE_STATIC ${CUDA_STATIC_RUNTIME})
1089+
rapids_cuda_set_runtime(cudftestutil USE_STATIC ON)
10941090
add_library(cudf::cudftestutil ALIAS cudftestutil)
10951091

10961092
add_library(cudftestutil_impl INTERFACE)
@@ -1151,7 +1147,7 @@ if(CUDF_BUILD_STREAMS_TEST_UTIL)
11511147
endif()
11521148

11531149
set(sanitizer_relative_genex
1154-
"$<PATH:RELATIVE_PATH,$<TARGET_FILE_DIR:CUDA::sanitizer>,$<TARGET_FILE_DIR:CUDA::cudart>>"
1150+
"$<PATH:RELATIVE_PATH,$<TARGET_FILE_DIR:CUDA::sanitizer>,$<TARGET_FILE_DIR:CUDA::cudart_static>>"
11551151
)
11561152
set_target_properties(
11571153
${_tgt}
@@ -1166,9 +1162,9 @@ if(CUDF_BUILD_STREAMS_TEST_UTIL)
11661162
${_tgt} PRIVATE "$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CXX>:${CUDF_CXX_FLAGS}>>"
11671163
)
11681164
target_include_directories(${_tgt} PRIVATE "$<BUILD_INTERFACE:${CUDF_SOURCE_DIR}/include>")
1169-
target_link_libraries(${_tgt} PUBLIC CUDA::cudart rmm::rmm CUDA::sanitizer)
1165+
target_link_libraries(${_tgt} PUBLIC CUDA::cudart_static rmm::rmm CUDA::sanitizer)
11701166

1171-
rapids_cuda_set_runtime(${_tgt} USE_STATIC ${CUDA_STATIC_RUNTIME})
1167+
rapids_cuda_set_runtime(${_tgt} USE_STATIC ON)
11721168
add_library(cudf::${_tgt} ALIAS ${_tgt})
11731169

11741170
if("${_mode}" STREQUAL "testing")

cpp/benchmarks/join/distinct_join.cu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ void nvbench_distinct_inner_join(nvbench::state& state,
1818
{
1919
auto dtypes = cycle_dtypes(get_type_or_group(static_cast<int32_t>(DataType)), num_keys);
2020

21-
auto join = [](cudf::table_view const& probe_input,
22-
cudf::table_view const& build_input,
21+
auto join = [](cudf::table_view const& left_input,
22+
cudf::table_view const& right_input,
2323
cudf::null_equality compare_nulls) {
24-
auto hj_obj = cudf::distinct_hash_join{build_input, compare_nulls, LOAD_FACTOR};
25-
return hj_obj.inner_join(probe_input);
24+
auto hj_obj = cudf::distinct_hash_join{right_input, compare_nulls, LOAD_FACTOR};
25+
return hj_obj.inner_join(left_input);
2626
};
2727

2828
BM_join<Nullable, join_t::HASH, NullEquality>(state, dtypes, join);
@@ -36,11 +36,11 @@ void nvbench_distinct_left_join(nvbench::state& state,
3636
{
3737
auto dtypes = cycle_dtypes(get_type_or_group(static_cast<int32_t>(DataType)), num_keys);
3838

39-
auto join = [](cudf::table_view const& probe_input,
40-
cudf::table_view const& build_input,
39+
auto join = [](cudf::table_view const& left_input,
40+
cudf::table_view const& right_input,
4141
cudf::null_equality compare_nulls) {
42-
auto hj_obj = cudf::distinct_hash_join{build_input, compare_nulls, LOAD_FACTOR};
43-
return hj_obj.left_join(probe_input);
42+
auto hj_obj = cudf::distinct_hash_join{right_input, compare_nulls, LOAD_FACTOR};
43+
return hj_obj.left_join(left_input);
4444
};
4545

4646
BM_join<Nullable, join_t::HASH, NullEquality>(state, dtypes, join);

cpp/cmake/Modules/JitifyPreprocessKernels.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
add_executable(jitify_preprocess "${JITIFY_INCLUDE_DIR}/jitify2_preprocess.cpp")
1010

1111
target_compile_definitions(jitify_preprocess PRIVATE "_FILE_OFFSET_BITS=64")
12-
rapids_cuda_set_runtime(jitify_preprocess USE_STATIC ${CUDA_STATIC_RUNTIME})
12+
rapids_cuda_set_runtime(jitify_preprocess USE_STATIC ON)
1313
target_link_libraries(jitify_preprocess PUBLIC ${CMAKE_DL_LIBS})
1414

1515
# Take a list of files to JIT-compile and run them through jitify_preprocess.

cpp/include/cudf/detail/join/distinct_hash_join.cuh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
#pragma once
@@ -25,14 +25,14 @@ using cudf::detail::row::lhs_index_type;
2525
using cudf::detail::row::rhs_index_type;
2626

2727
/**
28-
* @brief A custom comparator used for the build table insertion
28+
* @brief A custom comparator used for the right table insertion
2929
*/
3030
struct always_not_equal {
3131
__device__ constexpr bool operator()(
3232
cuco::pair<hash_value_type, rhs_index_type> const&,
3333
cuco::pair<hash_value_type, rhs_index_type> const&) const noexcept
3434
{
35-
// All build table keys are distinct thus `false` no matter what
35+
// All right table keys are distinct thus `false` no matter what
3636
return false;
3737
}
3838
};
@@ -76,11 +76,11 @@ struct primitive_comparator_adapter {
7676
};
7777

7878
/**
79-
* @brief Distinct hash join that builds hash table in creation and probes results in subsequent
80-
* `*_join` member functions.
79+
* @brief Distinct hash join that builds a hash table with the right table on construction and
80+
* probes results in subsequent `*_join` member functions.
8181
*
82-
* This class enables the distinct hash join scheme that builds hash table once, and probes as many
83-
* times as needed (possibly in parallel).
82+
* This class enables the distinct hash join scheme that builds with the right table once and
83+
* probes with many left tables (possibly in parallel).
8484
*/
8585
class distinct_hash_join {
8686
public:
@@ -104,15 +104,15 @@ class distinct_hash_join {
104104
};
105105

106106
/**
107-
* @brief Constructor that internally builds the hash table based on the given `build` table.
107+
* @brief Constructor that internally builds the hash table from the given `right` table.
108108
*
109-
* @throw cudf::logic_error if the number of columns in `build` table is 0.
109+
* @throw cudf::logic_error if the number of columns in `right` table is 0.
110110
*
111-
* @param build The build table, from which the hash table is built
111+
* @param right The right table, from which the hash table is built
112112
* @param compare_nulls Controls whether null join-key values should match or not.
113113
* @param stream CUDA stream used for device memory operations and kernel launches.
114114
*/
115-
distinct_hash_join(cudf::table_view const& build,
115+
distinct_hash_join(cudf::table_view const& right,
116116
cudf::null_equality compare_nulls,
117117
rmm::cuda_stream_view stream);
118118

@@ -121,7 +121,7 @@ class distinct_hash_join {
121121
*
122122
* @param load_factor The hash table occupancy ratio in (0,1]. A value of 0.5 means 50% occupancy.
123123
*/
124-
distinct_hash_join(cudf::table_view const& build,
124+
distinct_hash_join(cudf::table_view const& right,
125125
cudf::null_equality compare_nulls,
126126
double load_factor,
127127
rmm::cuda_stream_view stream);
@@ -131,15 +131,15 @@ class distinct_hash_join {
131131
*/
132132
std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
133133
std::unique_ptr<rmm::device_uvector<size_type>>>
134-
inner_join(cudf::table_view const& probe,
134+
inner_join(cudf::table_view const& left,
135135
rmm::cuda_stream_view stream,
136136
rmm::device_async_resource_ref mr) const;
137137

138138
/**
139139
* @copydoc cudf::distinct_hash_join::left_join
140140
*/
141141
std::unique_ptr<rmm::device_uvector<size_type>> left_join(
142-
cudf::table_view const& probe,
142+
cudf::table_view const& left,
143143
rmm::cuda_stream_view stream,
144144
rmm::device_async_resource_ref mr) const;
145145

@@ -156,11 +156,11 @@ class distinct_hash_join {
156156
rmm::mr::polymorphic_allocator<char>,
157157
cuco_storage_type>;
158158

159-
bool _has_nested_columns; ///< True if nested columns are present in build and probe tables
159+
bool _has_nested_columns; ///< True if nested columns are present in right and left tables
160160
cudf::null_equality _nulls_equal; ///< Whether to consider nulls as equal
161-
cudf::table_view _build; ///< Input table to build the hash map
161+
cudf::table_view _right; ///< Input table to build the hash map
162162
std::shared_ptr<cudf::detail::row::equality::preprocessed_table>
163-
_preprocessed_build; ///< Input table preprocssed for row operators
164-
hash_table_type _hash_table; ///< Hash table built on `_build`
163+
_preprocessed_right; ///< Input table preprocssed for row operators
164+
hash_table_type _hash_table; ///< Hash table built on `_right`
165165
};
166166
} // namespace cudf::detail

cpp/include/cudf/detail/join/hash_join.hpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class preprocessed_table;
2929
namespace cudf {
3030
namespace detail {
3131
/**
32-
* @brief Hash join that builds hash table in creation and probes results in subsequent `*_join`
33-
* member functions.
32+
* @brief Hash join that builds a hash table with the right table on construction and probes
33+
* results in subsequent `*_join` member functions.
3434
*
3535
* User-defined hash function can be passed via the template parameter `Hasher`
3636
*
@@ -50,17 +50,17 @@ class hash_join {
5050
hash_join& operator=(hash_join&&) = delete;
5151

5252
/**
53-
* @brief Constructor that internally builds the hash table based on the given `build` table.
53+
* @brief Constructor that internally builds the hash table from the given `right` table.
5454
*
55-
* @throw cudf::logic_error if the number of columns in `build` table is 0.
55+
* @throw cudf::logic_error if the number of columns in `right` table is 0.
5656
*
57-
* @param build The build table, from which the hash table is built.
58-
* @param has_nulls Flag to indicate if the there exists any nulls in the `build` table or
59-
* any `probe` table that will be used later for join.
57+
* @param right The right table, from which the hash table is built.
58+
* @param has_nulls Flag to indicate if the there exists any nulls in the `right` table or
59+
* any `left` table that will be used later for join.
6060
* @param compare_nulls Controls whether null join-key values should match or not.
6161
* @param stream CUDA stream used for device memory operations and kernel launches.
6262
*/
63-
hash_join(cudf::table_view const& build,
63+
hash_join(cudf::table_view const& right,
6464
bool has_nulls,
6565
cudf::null_equality compare_nulls,
6666
rmm::cuda_stream_view stream);
@@ -70,7 +70,7 @@ class hash_join {
7070
*
7171
* @param load_factor The hash table occupancy ratio in (0,1]. A value of 0.5 means 50% occupancy.
7272
*/
73-
hash_join(cudf::table_view const& build,
73+
hash_join(cudf::table_view const& right,
7474
bool has_nulls,
7575
cudf::null_equality compare_nulls,
7676
double load_factor,
@@ -81,7 +81,7 @@ class hash_join {
8181
*/
8282
[[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
8383
std::unique_ptr<rmm::device_uvector<size_type>>>
84-
inner_join(cudf::table_view const& probe,
84+
inner_join(cudf::table_view const& left,
8585
std::optional<std::size_t> output_size,
8686
rmm::cuda_stream_view stream,
8787
rmm::device_async_resource_ref mr) const;
@@ -91,7 +91,7 @@ class hash_join {
9191
*/
9292
[[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
9393
std::unique_ptr<rmm::device_uvector<size_type>>>
94-
left_join(cudf::table_view const& probe,
94+
left_join(cudf::table_view const& left,
9595
std::optional<std::size_t> output_size,
9696
rmm::cuda_stream_view stream,
9797
rmm::device_async_resource_ref mr) const;
@@ -101,83 +101,83 @@ class hash_join {
101101
*/
102102
[[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
103103
std::unique_ptr<rmm::device_uvector<size_type>>>
104-
full_join(cudf::table_view const& probe,
104+
full_join(cudf::table_view const& left,
105105
std::optional<std::size_t> output_size,
106106
rmm::cuda_stream_view stream,
107107
rmm::device_async_resource_ref mr) const;
108108

109109
/**
110110
* @copydoc cudf::hash_join::inner_join_size
111111
*/
112-
[[nodiscard]] std::size_t inner_join_size(cudf::table_view const& probe,
112+
[[nodiscard]] std::size_t inner_join_size(cudf::table_view const& left,
113113
rmm::cuda_stream_view stream) const;
114114

115115
/**
116116
* @copydoc cudf::hash_join::left_join_size
117117
*/
118-
[[nodiscard]] std::size_t left_join_size(cudf::table_view const& probe,
118+
[[nodiscard]] std::size_t left_join_size(cudf::table_view const& left,
119119
rmm::cuda_stream_view stream) const;
120120

121121
/**
122122
* @copydoc cudf::hash_join::full_join_size
123123
*/
124-
[[nodiscard]] std::size_t full_join_size(cudf::table_view const& probe,
124+
[[nodiscard]] std::size_t full_join_size(cudf::table_view const& left,
125125
rmm::cuda_stream_view stream,
126126
rmm::device_async_resource_ref mr) const;
127127

128128
/**
129129
* @copydoc cudf::hash_join::inner_join_match_context
130130
*/
131131
[[nodiscard]] cudf::join_match_context inner_join_match_context(
132-
cudf::table_view const& probe,
132+
cudf::table_view const& left,
133133
rmm::cuda_stream_view stream,
134134
rmm::device_async_resource_ref mr) const;
135135

136136
/**
137137
* @copydoc cudf::hash_join::left_join_match_context
138138
*/
139139
[[nodiscard]] cudf::join_match_context left_join_match_context(
140-
cudf::table_view const& probe,
140+
cudf::table_view const& left,
141141
rmm::cuda_stream_view stream,
142142
rmm::device_async_resource_ref mr) const;
143143

144144
/**
145145
* @copydoc cudf::hash_join::full_join_match_context
146146
*/
147147
[[nodiscard]] cudf::join_match_context full_join_match_context(
148-
cudf::table_view const& probe,
148+
cudf::table_view const& left,
149149
rmm::cuda_stream_view stream,
150150
rmm::device_async_resource_ref mr) const;
151151

152152
private:
153153
bool const _is_empty; ///< true if `_hash_table` is empty
154-
bool const _has_nulls; ///< true if nulls are present in either build table or any probe table
154+
bool const _has_nulls; ///< true if nulls are present in either right table or any left table
155155
cudf::null_equality const _nulls_equal; ///< whether to consider nulls as equal
156-
cudf::table_view _build; ///< input table to build the hash map
156+
cudf::table_view _right; ///< input table to build the hash map
157157
std::shared_ptr<cudf::detail::row::equality::preprocessed_table>
158-
_preprocessed_build; ///< input table preprocssed for row operators
158+
_preprocessed_right; ///< input table preprocssed for row operators
159159
std::unique_ptr<impl> _impl; ///< CUDA hash table implementation
160160

161161
[[nodiscard]] std::unique_ptr<rmm::device_uvector<size_type>> make_match_counts(
162162
join_kind join,
163-
cudf::table_view const& probe,
163+
cudf::table_view const& left,
164164
rmm::cuda_stream_view stream,
165165
rmm::device_async_resource_ref mr) const;
166166

167167
template <join_kind Join>
168168
[[nodiscard]] std::pair<std::unique_ptr<rmm::device_uvector<size_type>>,
169169
std::unique_ptr<rmm::device_uvector<size_type>>>
170-
join_retrieve(cudf::table_view const& probe,
170+
join_retrieve(cudf::table_view const& left,
171171
std::optional<std::size_t> output_size,
172172
rmm::cuda_stream_view stream,
173173
rmm::device_async_resource_ref mr) const;
174174

175175
template <join_kind Join>
176-
[[nodiscard]] std::size_t join_size(cudf::table_view const& probe,
176+
[[nodiscard]] std::size_t join_size(cudf::table_view const& left,
177177
rmm::cuda_stream_view stream) const;
178178

179179
template <join_kind Join>
180-
[[nodiscard]] std::size_t join_size(cudf::table_view const& probe,
180+
[[nodiscard]] std::size_t join_size(cudf::table_view const& left,
181181
rmm::cuda_stream_view stream,
182182
rmm::device_async_resource_ref mr) const;
183183
};

0 commit comments

Comments
 (0)