-
Notifications
You must be signed in to change notification settings - Fork 933
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-24.12' into json-quote-char-parsing-fix
- Loading branch information
Showing
278 changed files
with
10,671 additions
and
8,351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,11 +47,23 @@ jobs: | |
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
build_type: nightly | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
# Use the wheel container so we can skip conda solves and since our | ||
# primary static consumers (Spark) are not in conda anyway. | ||
container_image: "rapidsai/ci-wheel:latest" | ||
run_script: "ci/configure_cpp_static.sh" | ||
clang-tidy: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: nightly | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
run_script: "ci/clang_tidy.sh" | ||
conda-python-cudf-tests: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
rapids-logger "Create clang-tidy conda environment" | ||
. /opt/conda/etc/profile.d/conda.sh | ||
|
||
ENV_YAML_DIR="$(mktemp -d)" | ||
|
||
rapids-dependency-file-generator \ | ||
--output conda \ | ||
--file-key clang_tidy \ | ||
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml" | ||
|
||
rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n clang_tidy | ||
|
||
# Temporarily allow unbound variables for conda activation. | ||
set +u | ||
conda activate clang_tidy | ||
set -u | ||
|
||
RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)" | ||
|
||
source rapids-configure-sccache | ||
|
||
# Run the build via CMake, which will run clang-tidy when CUDF_CLANG_TIDY is enabled. | ||
cmake -S cpp -B cpp/build -DCMAKE_BUILD_TYPE=Release -DCUDF_CLANG_TIDY=ON -GNinja | ||
cmake --build cpp/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
# This assumes the script is executed from the root of the repo directory | ||
./build.sh cudf_polars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %} | ||
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} | ||
{% set py_version = environ['CONDA_PY'] %} | ||
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} | ||
{% set cuda_major = cuda_version.split('.')[0] %} | ||
{% set date_string = environ['RAPIDS_DATE_STRING'] %} | ||
|
||
package: | ||
name: cudf-polars | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../../.. | ||
|
||
build: | ||
number: {{ GIT_DESCRIBE_NUMBER }} | ||
string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} | ||
script_env: | ||
- AWS_ACCESS_KEY_ID | ||
- AWS_SECRET_ACCESS_KEY | ||
- AWS_SESSION_TOKEN | ||
- CMAKE_C_COMPILER_LAUNCHER | ||
- CMAKE_CUDA_COMPILER_LAUNCHER | ||
- CMAKE_CXX_COMPILER_LAUNCHER | ||
- CMAKE_GENERATOR | ||
- PARALLEL_LEVEL | ||
- SCCACHE_BUCKET | ||
- SCCACHE_IDLE_TIMEOUT | ||
- SCCACHE_REGION | ||
- SCCACHE_S3_KEY_PREFIX=cudf-polars-aarch64 # [aarch64] | ||
- SCCACHE_S3_KEY_PREFIX=cudf-polars-linux64 # [linux64] | ||
- SCCACHE_S3_USE_SSL | ||
- SCCACHE_S3_NO_CREDENTIALS | ||
|
||
requirements: | ||
host: | ||
- python | ||
- rapids-build-backend >=0.3.0,<0.4.0.dev0 | ||
- setuptools | ||
- cuda-version ={{ cuda_version }} | ||
run: | ||
- python | ||
- pylibcudf ={{ version }} | ||
- polars >=1.8,<1.9 | ||
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} | ||
|
||
test: | ||
requires: | ||
- cuda-version ={{ cuda_version }} | ||
imports: | ||
- cudf_polars | ||
|
||
|
||
about: | ||
home: https://rapids.ai/ | ||
license: Apache-2.0 | ||
license_family: APACHE | ||
license_file: LICENSE | ||
summary: cudf-polars library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Copyright (c) 2024, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <benchmarks/common/generate_input.hpp> | ||
|
||
#include <cudf/column/column_device_view.cuh> | ||
#include <cudf/column/column_factories.hpp> | ||
|
||
#include <rmm/device_uvector.hpp> | ||
#include <rmm/exec_policy.hpp> | ||
|
||
#include <thrust/pair.h> | ||
#include <thrust/tabulate.h> | ||
|
||
#include <nvbench/nvbench.cuh> | ||
|
||
#include <vector> | ||
|
||
namespace { | ||
|
||
constexpr int min_row_width = 0; | ||
constexpr int max_row_width = 50; | ||
|
||
using string_index_pair = thrust::pair<char const*, cudf::size_type>; | ||
|
||
template <bool batch_construction> | ||
std::vector<std::unique_ptr<cudf::column>> make_strings_columns( | ||
std::vector<cudf::device_span<string_index_pair const>> const& input, | ||
rmm::cuda_stream_view stream) | ||
{ | ||
if constexpr (batch_construction) { | ||
return cudf::make_strings_column_batch(input, stream); | ||
} else { | ||
std::vector<std::unique_ptr<cudf::column>> output; | ||
output.reserve(input.size()); | ||
for (auto const& column_input : input) { | ||
output.emplace_back(cudf::make_strings_column(column_input, stream)); | ||
} | ||
return output; | ||
} | ||
} | ||
|
||
} // namespace | ||
|
||
static void BM_make_strings_column_batch(nvbench::state& state) | ||
{ | ||
auto const num_rows = static_cast<cudf::size_type>(state.get_int64("num_rows")); | ||
auto const batch_size = static_cast<cudf::size_type>(state.get_int64("batch_size")); | ||
auto const has_nulls = true; | ||
|
||
data_profile const table_profile = | ||
data_profile_builder() | ||
.distribution(cudf::type_id::STRING, distribution_id::NORMAL, min_row_width, max_row_width) | ||
.null_probability(has_nulls ? std::optional<double>{0.1} : std::nullopt); | ||
auto const data_table = create_random_table( | ||
cycle_dtypes({cudf::type_id::STRING}, batch_size), row_count{num_rows}, table_profile); | ||
|
||
auto const stream = cudf::get_default_stream(); | ||
auto input_data = std::vector<rmm::device_uvector<string_index_pair>>{}; | ||
auto input = std::vector<cudf::device_span<string_index_pair const>>{}; | ||
input_data.reserve(batch_size); | ||
input.reserve(batch_size); | ||
for (auto const& cv : data_table->view()) { | ||
auto const d_data_ptr = cudf::column_device_view::create(cv, stream); | ||
auto batch_input = rmm::device_uvector<string_index_pair>(cv.size(), stream); | ||
thrust::tabulate(rmm::exec_policy(stream), | ||
batch_input.begin(), | ||
batch_input.end(), | ||
[data_col = *d_data_ptr] __device__(auto const idx) { | ||
if (data_col.is_null(idx)) { return string_index_pair{nullptr, 0}; } | ||
auto const row = data_col.element<cudf::string_view>(idx); | ||
return string_index_pair{row.data(), row.size_bytes()}; | ||
}); | ||
input_data.emplace_back(std::move(batch_input)); | ||
input.emplace_back(input_data.back()); | ||
} | ||
|
||
state.set_cuda_stream(nvbench::make_cuda_stream_view(stream.value())); | ||
state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { | ||
[[maybe_unused]] auto const output = make_strings_columns<true>(input, stream); | ||
}); | ||
} | ||
|
||
NVBENCH_BENCH(BM_make_strings_column_batch) | ||
.set_name("make_strings_column_batch") | ||
.add_int64_axis("num_rows", {100'000, 500'000, 1'000'000, 2'000'000}) | ||
.add_int64_axis("batch_size", {10, 20, 50, 100}); |
Oops, something went wrong.