diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 666d8844a80..e27361ab263 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -22,13 +22,13 @@ on:
default: nightly
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
cpp-build:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
@@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
@@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
@@ -57,7 +57,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
arch: "amd64"
branch: ${{ inputs.branch }}
@@ -69,9 +69,10 @@ jobs:
sha: ${{ inputs.sha }}
wheel-build-cudf:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
+ build-2_28-wheels: "true"
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
@@ -79,7 +80,7 @@ jobs:
wheel-publish-cudf:
needs: wheel-build-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
@@ -89,7 +90,7 @@ jobs:
wheel-build-dask-cudf:
needs: wheel-publish-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1")))
build_type: ${{ inputs.build_type || 'branch' }}
@@ -100,7 +101,7 @@ jobs:
wheel-publish-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-23.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 23956a02fbd..31e78f82a62 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- - uses: actions/labeler@main
+ - uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml
index abf5fcf2f33..40cf0dcd2c1 100644
--- a/.github/workflows/pr.yaml
+++ b/.github/workflows/pr.yaml
@@ -30,34 +30,34 @@ jobs:
#- pandas-tests-diff
#- pandas-tests-diff-comment
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-23.12
checks:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-23.12
with:
enable_check_generated_files: false
conda-cpp-build:
needs: checks
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.12
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-23.12
with:
build_type: pull-request
conda-python-cudf-tests:
needs: conda-python-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12
with:
build_type: pull-request
test_script: "ci/test_python_cudf.sh"
@@ -65,14 +65,14 @@ jobs:
# Tests for dask_cudf, custreamz, cudf_kafka are separated for CI parallelism
needs: conda-python-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12
with:
build_type: pull-request
test_script: "ci/test_python_other.sh"
conda-java-tests:
needs: conda-cpp-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
@@ -82,7 +82,7 @@ jobs:
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
@@ -92,7 +92,7 @@ jobs:
docs-build:
needs: conda-python-build
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
@@ -102,21 +102,22 @@ jobs:
wheel-build-cudf:
needs: checks
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.12
with:
build_type: pull-request
+ build-2_28-wheels: "true"
script: "ci/build_wheel_cudf.sh"
wheel-tests-cudf:
needs: wheel-build-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
build_type: pull-request
script: ci/test_wheel_cudf.sh
wheel-build-dask-cudf:
needs: wheel-tests-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1")))
build_type: pull-request
@@ -124,7 +125,7 @@ jobs:
wheel-tests-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1")))
build_type: pull-request
@@ -132,7 +133,7 @@ jobs:
unit-tests-cudf-pandas:
needs: wheel-build-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1")))
build_type: pull-request
@@ -141,7 +142,7 @@ jobs:
# run the Pandas unit tests using PR branch
needs: wheel-build-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64")) | max_by(.CUDA_VER) | [.]
build_type: pull-request
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 49a9c73d026..0d4401160e1 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -16,7 +16,7 @@ on:
jobs:
conda-cpp-tests:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -24,7 +24,7 @@ jobs:
sha: ${{ inputs.sha }}
conda-cpp-memcheck-tests:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -36,7 +36,7 @@ jobs:
run_script: "ci/test_cpp_memcheck.sh"
conda-python-cudf-tests:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -46,7 +46,7 @@ jobs:
conda-python-other-tests:
# Tests for dask_cudf, custreamz, cudf_kafka are separated for CI parallelism
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -55,7 +55,7 @@ jobs:
test_script: "ci/test_python_other.sh"
conda-java-tests:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -67,7 +67,7 @@ jobs:
run_script: "ci/test_java.sh"
conda-notebook-tests:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -79,7 +79,7 @@ jobs:
run_script: "ci/test_notebooks.sh"
wheel-tests-cudf:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -88,7 +88,7 @@ jobs:
script: ci/test_wheel_cudf.sh
wheel-tests-dask-cudf:
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64" and .PY_VER == "3.10" and (.CUDA_VER == "11.8.0" or .CUDA_VER == "12.0.1")))
build_type: nightly
@@ -97,9 +97,8 @@ jobs:
sha: ${{ inputs.sha }}
script: ci/test_wheel_dask_cudf.sh
unit-tests-cudf-pandas:
- needs: wheel-build-cudf
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
@@ -109,7 +108,7 @@ jobs:
pandas-tests:
# run the Pandas unit tests
secrets: inherit
- uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.10
+ uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-23.12
with:
matrix_filter: map(select(.ARCH == "amd64")) | max_by(.CUDA_VER) | [.]
build_type: nightly
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ecd547ab5b3..3cb6caa25ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,140 @@
+# cuDF 23.12.00 (6 Dec 2023)
+
+## 🚨 Breaking Changes
+
+- Raise error in `reindex` when `index` is not unique ([#14400](https://github.com/rapidsai/cudf/pull/14400)) [@galipremsagar](https://github.com/galipremsagar)
+- Expose stream parameter to get_json_object API ([#14297](https://github.com/rapidsai/cudf/pull/14297)) [@davidwendt](https://github.com/davidwendt)
+- Refactor cudf_kafka to use skbuild ([#14292](https://github.com/rapidsai/cudf/pull/14292)) [@jdye64](https://github.com/jdye64)
+- Expose stream parameter in public strings convert APIs ([#14255](https://github.com/rapidsai/cudf/pull/14255)) [@davidwendt](https://github.com/davidwendt)
+- Upgrade to nvCOMP 3.0.4 ([#13815](https://github.com/rapidsai/cudf/pull/13815)) [@vuule](https://github.com/vuule)
+
+## 🐛 Bug Fixes
+
+- Update actions/labeler to v4 ([#14562](https://github.com/rapidsai/cudf/pull/14562)) [@raydouglass](https://github.com/raydouglass)
+- Fix data corruption when skipping rows ([#14557](https://github.com/rapidsai/cudf/pull/14557)) [@etseidl](https://github.com/etseidl)
+- Fix function name typo in `cudf.pandas` profiler ([#14514](https://github.com/rapidsai/cudf/pull/14514)) [@galipremsagar](https://github.com/galipremsagar)
+- Fix intermediate type checking in expression parsing ([#14445](https://github.com/rapidsai/cudf/pull/14445)) [@vyasr](https://github.com/vyasr)
+- Forward merge `branch-23.10` into `branch-23.12` ([#14435](https://github.com/rapidsai/cudf/pull/14435)) [@raydouglass](https://github.com/raydouglass)
+- Remove needs: wheel-build-cudf. ([#14427](https://github.com/rapidsai/cudf/pull/14427)) [@bdice](https://github.com/bdice)
+- Fix dask dependency in custreamz ([#14420](https://github.com/rapidsai/cudf/pull/14420)) [@vyasr](https://github.com/vyasr)
+- Ensure nvbench initializes nvml context when built statically ([#14411](https://github.com/rapidsai/cudf/pull/14411)) [@robertmaynard](https://github.com/robertmaynard)
+- Support java AST String literal with desired encoding ([#14402](https://github.com/rapidsai/cudf/pull/14402)) [@winningsix](https://github.com/winningsix)
+- Raise error in `reindex` when `index` is not unique ([#14400](https://github.com/rapidsai/cudf/pull/14400)) [@galipremsagar](https://github.com/galipremsagar)
+- Always build nvbench statically so we don't need to package it ([#14399](https://github.com/rapidsai/cudf/pull/14399)) [@robertmaynard](https://github.com/robertmaynard)
+- Fix token-count logic in nvtext::tokenize_with_vocabulary ([#14393](https://github.com/rapidsai/cudf/pull/14393)) [@davidwendt](https://github.com/davidwendt)
+- Fix as_column(pd.Timestamp/Timedelta, length=) not respecting length ([#14390](https://github.com/rapidsai/cudf/pull/14390)) [@mroeschke](https://github.com/mroeschke)
+- cudf.pandas: cuDF subpath checking in module `__getattr__` ([#14388](https://github.com/rapidsai/cudf/pull/14388)) [@shwina](https://github.com/shwina)
+- Fix and disable encoding for nanosecond statistics in ORC writer ([#14367](https://github.com/rapidsai/cudf/pull/14367)) [@vuule](https://github.com/vuule)
+- Add the new manylinux builds to the build job ([#14351](https://github.com/rapidsai/cudf/pull/14351)) [@vyasr](https://github.com/vyasr)
+- cudf jit parser now supports .pragma instructions with quotes ([#14348](https://github.com/rapidsai/cudf/pull/14348)) [@robertmaynard](https://github.com/robertmaynard)
+- Fix overflow check in `cudf::merge` ([#14345](https://github.com/rapidsai/cudf/pull/14345)) [@divyegala](https://github.com/divyegala)
+- Add cramjam ([#14344](https://github.com/rapidsai/cudf/pull/14344)) [@vyasr](https://github.com/vyasr)
+- Enable `dask_cudf/io` pytests in CI ([#14338](https://github.com/rapidsai/cudf/pull/14338)) [@galipremsagar](https://github.com/galipremsagar)
+- Temporarily avoid the current build of pydata-sphinx-theme ([#14332](https://github.com/rapidsai/cudf/pull/14332)) [@vyasr](https://github.com/vyasr)
+- Fix host buffer access from device function in the Parquet reader ([#14328](https://github.com/rapidsai/cudf/pull/14328)) [@vuule](https://github.com/vuule)
+- Run IO tests for Dask-cuDF ([#14327](https://github.com/rapidsai/cudf/pull/14327)) [@rjzamora](https://github.com/rjzamora)
+- Fix logical type issues in the Parquet writer ([#14322](https://github.com/rapidsai/cudf/pull/14322)) [@vuule](https://github.com/vuule)
+- Remove aws-sdk-pinning and revert to arrow 12.0.1 ([#14319](https://github.com/rapidsai/cudf/pull/14319)) [@vyasr](https://github.com/vyasr)
+- test is_valid before reading column data ([#14318](https://github.com/rapidsai/cudf/pull/14318)) [@etseidl](https://github.com/etseidl)
+- Fix gtest validity setting for TextTokenizeTest.Vocabulary ([#14312](https://github.com/rapidsai/cudf/pull/14312)) [@davidwendt](https://github.com/davidwendt)
+- Fixes stack context for json lines format that recovers from invalid JSON lines ([#14309](https://github.com/rapidsai/cudf/pull/14309)) [@elstehle](https://github.com/elstehle)
+- Downgrade to Arrow 12.0.0 for aws-sdk-cpp and fix cudf_kafka builds for new CI containers ([#14296](https://github.com/rapidsai/cudf/pull/14296)) [@vyasr](https://github.com/vyasr)
+- fixing thread index overflow issue ([#14290](https://github.com/rapidsai/cudf/pull/14290)) [@hyperbolic2346](https://github.com/hyperbolic2346)
+- Fix memset error in nvtext::edit_distance_matrix ([#14283](https://github.com/rapidsai/cudf/pull/14283)) [@davidwendt](https://github.com/davidwendt)
+- Changes JSON reader's recovery option's behaviour to ignore all characters after a valid JSON record ([#14279](https://github.com/rapidsai/cudf/pull/14279)) [@elstehle](https://github.com/elstehle)
+- Handle empty string correctly in Parquet statistics ([#14257](https://github.com/rapidsai/cudf/pull/14257)) [@etseidl](https://github.com/etseidl)
+- Fixes behaviour for incomplete lines when `recover_with_nulls` is enabled ([#14252](https://github.com/rapidsai/cudf/pull/14252)) [@elstehle](https://github.com/elstehle)
+- cudf::detail::pinned_allocator doesn't throw from `deallocate` ([#14251](https://github.com/rapidsai/cudf/pull/14251)) [@robertmaynard](https://github.com/robertmaynard)
+- Fix strings replace for adjacent, identical multi-byte UTF-8 character targets ([#14235](https://github.com/rapidsai/cudf/pull/14235)) [@davidwendt](https://github.com/davidwendt)
+- Fix the precision when converting a decimal128 column to an arrow array ([#14230](https://github.com/rapidsai/cudf/pull/14230)) [@jihoonson](https://github.com/jihoonson)
+- Fixing parquet list of struct interpretation ([#13715](https://github.com/rapidsai/cudf/pull/13715)) [@hyperbolic2346](https://github.com/hyperbolic2346)
+
+## 📖 Documentation
+
+- Fix io reference in docs. ([#14452](https://github.com/rapidsai/cudf/pull/14452)) [@bdice](https://github.com/bdice)
+- Update README ([#14374](https://github.com/rapidsai/cudf/pull/14374)) [@shwina](https://github.com/shwina)
+- Example code for blog on new row comparators ([#13795](https://github.com/rapidsai/cudf/pull/13795)) [@divyegala](https://github.com/divyegala)
+
+## 🚀 New Features
+
+- Expose streams in public unary APIs ([#14342](https://github.com/rapidsai/cudf/pull/14342)) [@vyasr](https://github.com/vyasr)
+- Add python tests for Parquet DELTA_BINARY_PACKED encoder ([#14316](https://github.com/rapidsai/cudf/pull/14316)) [@etseidl](https://github.com/etseidl)
+- Update rapids-cmake functions to non-deprecated signatures ([#14265](https://github.com/rapidsai/cudf/pull/14265)) [@robertmaynard](https://github.com/robertmaynard)
+- Expose streams in public null mask APIs ([#14263](https://github.com/rapidsai/cudf/pull/14263)) [@vyasr](https://github.com/vyasr)
+- Expose streams in binaryop APIs ([#14187](https://github.com/rapidsai/cudf/pull/14187)) [@vyasr](https://github.com/vyasr)
+- Add pylibcudf.Scalar that interoperates with Arrow scalars ([#14133](https://github.com/rapidsai/cudf/pull/14133)) [@vyasr](https://github.com/vyasr)
+- Add decoder for DELTA_BYTE_ARRAY to Parquet reader ([#14101](https://github.com/rapidsai/cudf/pull/14101)) [@etseidl](https://github.com/etseidl)
+- Add DELTA_BINARY_PACKED encoder for Parquet writer ([#14100](https://github.com/rapidsai/cudf/pull/14100)) [@etseidl](https://github.com/etseidl)
+- Add BytePairEncoder class to cuDF ([#13891](https://github.com/rapidsai/cudf/pull/13891)) [@davidwendt](https://github.com/davidwendt)
+- Upgrade to nvCOMP 3.0.4 ([#13815](https://github.com/rapidsai/cudf/pull/13815)) [@vuule](https://github.com/vuule)
+- Use `pynvjitlink` for CUDA 12+ MVC ([#13650](https://github.com/rapidsai/cudf/pull/13650)) [@brandon-b-miller](https://github.com/brandon-b-miller)
+
+## 🛠️ Improvements
+
+- Build concurrency for nightly and merge triggers ([#14441](https://github.com/rapidsai/cudf/pull/14441)) [@bdice](https://github.com/bdice)
+- Cleanup remaining usages of dask dependencies ([#14407](https://github.com/rapidsai/cudf/pull/14407)) [@galipremsagar](https://github.com/galipremsagar)
+- Update to Arrow 14.0.1. ([#14387](https://github.com/rapidsai/cudf/pull/14387)) [@bdice](https://github.com/bdice)
+- Remove Cython libcpp wrappers ([#14382](https://github.com/rapidsai/cudf/pull/14382)) [@vyasr](https://github.com/vyasr)
+- Forward-merge branch-23.10 to branch-23.12 ([#14372](https://github.com/rapidsai/cudf/pull/14372)) [@bdice](https://github.com/bdice)
+- Upgrade to arrow 14 ([#14371](https://github.com/rapidsai/cudf/pull/14371)) [@galipremsagar](https://github.com/galipremsagar)
+- Fix a pytest typo in `test_kurt_skew_error` ([#14368](https://github.com/rapidsai/cudf/pull/14368)) [@galipremsagar](https://github.com/galipremsagar)
+- Use new rapids-dask-dependency metapackage for managing dask versions ([#14364](https://github.com/rapidsai/cudf/pull/14364)) [@vyasr](https://github.com/vyasr)
+- Change `nullable()` to `has_nulls()` in `cudf::detail::gather` ([#14363](https://github.com/rapidsai/cudf/pull/14363)) [@divyegala](https://github.com/divyegala)
+- Split up scan_inclusive.cu to improve its compile time ([#14358](https://github.com/rapidsai/cudf/pull/14358)) [@davidwendt](https://github.com/davidwendt)
+- Implement user_datasource_wrapper is_empty() and is_device_read_preferred(). ([#14357](https://github.com/rapidsai/cudf/pull/14357)) [@tpn](https://github.com/tpn)
+- Added streams to CSV reader and writer api ([#14340](https://github.com/rapidsai/cudf/pull/14340)) [@shrshi](https://github.com/shrshi)
+- Upgrade wheels to use arrow 13 ([#14339](https://github.com/rapidsai/cudf/pull/14339)) [@vyasr](https://github.com/vyasr)
+- Rework nvtext::byte_pair_encoding API ([#14337](https://github.com/rapidsai/cudf/pull/14337)) [@davidwendt](https://github.com/davidwendt)
+- Improve performance of nvtext::tokenize_with_vocabulary for long strings ([#14336](https://github.com/rapidsai/cudf/pull/14336)) [@davidwendt](https://github.com/davidwendt)
+- Upgrade `arrow` to `13` ([#14330](https://github.com/rapidsai/cudf/pull/14330)) [@galipremsagar](https://github.com/galipremsagar)
+- Expose stream parameter in public nvtext replace APIs ([#14329](https://github.com/rapidsai/cudf/pull/14329)) [@davidwendt](https://github.com/davidwendt)
+- Drop `pyorc` dependency and use `pandas`/`pyarrow` instead ([#14323](https://github.com/rapidsai/cudf/pull/14323)) [@galipremsagar](https://github.com/galipremsagar)
+- Avoid `pyarrow.fs` import for local storage ([#14321](https://github.com/rapidsai/cudf/pull/14321)) [@rjzamora](https://github.com/rjzamora)
+- Unpin `dask` and `distributed` for `23.12` development ([#14320](https://github.com/rapidsai/cudf/pull/14320)) [@galipremsagar](https://github.com/galipremsagar)
+- Expose stream parameter in public nvtext tokenize APIs ([#14317](https://github.com/rapidsai/cudf/pull/14317)) [@davidwendt](https://github.com/davidwendt)
+- Added streams to JSON reader and writer api ([#14313](https://github.com/rapidsai/cudf/pull/14313)) [@shrshi](https://github.com/shrshi)
+- Minor improvements in `source_info` ([#14308](https://github.com/rapidsai/cudf/pull/14308)) [@vuule](https://github.com/vuule)
+- Forward-merge branch-23.10 to branch-23.12 ([#14307](https://github.com/rapidsai/cudf/pull/14307)) [@bdice](https://github.com/bdice)
+- Add stream parameter to Set Operations (Public List APIs) ([#14305](https://github.com/rapidsai/cudf/pull/14305)) [@SurajAralihalli](https://github.com/SurajAralihalli)
+- Expose stream parameter to get_json_object API ([#14297](https://github.com/rapidsai/cudf/pull/14297)) [@davidwendt](https://github.com/davidwendt)
+- Sort dictionary data alphabetically in the ORC writer ([#14295](https://github.com/rapidsai/cudf/pull/14295)) [@vuule](https://github.com/vuule)
+- Expose stream parameter in public strings filter APIs ([#14293](https://github.com/rapidsai/cudf/pull/14293)) [@davidwendt](https://github.com/davidwendt)
+- Refactor cudf_kafka to use skbuild ([#14292](https://github.com/rapidsai/cudf/pull/14292)) [@jdye64](https://github.com/jdye64)
+- Update `shared-action-workflows` references ([#14289](https://github.com/rapidsai/cudf/pull/14289)) [@AyodeAwe](https://github.com/AyodeAwe)
+- Register ``partd`` encode dispatch in ``dask_cudf`` ([#14287](https://github.com/rapidsai/cudf/pull/14287)) [@rjzamora](https://github.com/rjzamora)
+- Update versioning strategy ([#14285](https://github.com/rapidsai/cudf/pull/14285)) [@vyasr](https://github.com/vyasr)
+- Move and rename byte-pair-encoding source files ([#14284](https://github.com/rapidsai/cudf/pull/14284)) [@davidwendt](https://github.com/davidwendt)
+- Expose stream parameter in public strings combine APIs ([#14281](https://github.com/rapidsai/cudf/pull/14281)) [@davidwendt](https://github.com/davidwendt)
+- Expose stream parameter in public strings contains APIs ([#14280](https://github.com/rapidsai/cudf/pull/14280)) [@davidwendt](https://github.com/davidwendt)
+- Add stream parameter to List Sort and Filter APIs ([#14272](https://github.com/rapidsai/cudf/pull/14272)) [@SurajAralihalli](https://github.com/SurajAralihalli)
+- Use branch-23.12 workflows. ([#14271](https://github.com/rapidsai/cudf/pull/14271)) [@bdice](https://github.com/bdice)
+- Refactor LogicalType for Parquet ([#14264](https://github.com/rapidsai/cudf/pull/14264)) [@etseidl](https://github.com/etseidl)
+- Centralize chunked reading code in the parquet reader to reader_impl_chunking.cu ([#14262](https://github.com/rapidsai/cudf/pull/14262)) [@nvdbaranec](https://github.com/nvdbaranec)
+- Expose stream parameter in public strings replace APIs ([#14261](https://github.com/rapidsai/cudf/pull/14261)) [@davidwendt](https://github.com/davidwendt)
+- Expose stream parameter in public strings APIs ([#14260](https://github.com/rapidsai/cudf/pull/14260)) [@davidwendt](https://github.com/davidwendt)
+- Cleanup of namespaces in parquet code. ([#14259](https://github.com/rapidsai/cudf/pull/14259)) [@nvdbaranec](https://github.com/nvdbaranec)
+- Make parquet schema index type consistent ([#14256](https://github.com/rapidsai/cudf/pull/14256)) [@hyperbolic2346](https://github.com/hyperbolic2346)
+- Expose stream parameter in public strings convert APIs ([#14255](https://github.com/rapidsai/cudf/pull/14255)) [@davidwendt](https://github.com/davidwendt)
+- Add in java bindings for DataSource ([#14254](https://github.com/rapidsai/cudf/pull/14254)) [@revans2](https://github.com/revans2)
+- Reimplement `cudf::merge` for nested types without using comparators ([#14250](https://github.com/rapidsai/cudf/pull/14250)) [@divyegala](https://github.com/divyegala)
+- Add stream parameter to List Manipulation and Operations APIs ([#14248](https://github.com/rapidsai/cudf/pull/14248)) [@SurajAralihalli](https://github.com/SurajAralihalli)
+- Expose stream parameter in public strings split/partition APIs ([#14247](https://github.com/rapidsai/cudf/pull/14247)) [@davidwendt](https://github.com/davidwendt)
+- Improve `contains_column` by invoking `contains_table` ([#14238](https://github.com/rapidsai/cudf/pull/14238)) [@PointKernel](https://github.com/PointKernel)
+- Detect and report errors in Parquet header parsing ([#14237](https://github.com/rapidsai/cudf/pull/14237)) [@etseidl](https://github.com/etseidl)
+- Normalizing offsets iterator ([#14234](https://github.com/rapidsai/cudf/pull/14234)) [@davidwendt](https://github.com/davidwendt)
+- Forward merge `23.10` into `23.12` ([#14231](https://github.com/rapidsai/cudf/pull/14231)) [@galipremsagar](https://github.com/galipremsagar)
+- Return error if BOOL8 column-type is used with integers-to-hex ([#14208](https://github.com/rapidsai/cudf/pull/14208)) [@davidwendt](https://github.com/davidwendt)
+- Enable indexalator for device code ([#14206](https://github.com/rapidsai/cudf/pull/14206)) [@davidwendt](https://github.com/davidwendt)
+- Marginally reduce memory footprint of joins ([#14197](https://github.com/rapidsai/cudf/pull/14197)) [@wence-](https://github.com/wence-)
+- Add nvtx annotations to spilling-based data movement ([#14196](https://github.com/rapidsai/cudf/pull/14196)) [@wence-](https://github.com/wence-)
+- Optimize ORC writer for decimal columns ([#14190](https://github.com/rapidsai/cudf/pull/14190)) [@vuule](https://github.com/vuule)
+- Remove the use of volatile in ORC ([#14175](https://github.com/rapidsai/cudf/pull/14175)) [@vuule](https://github.com/vuule)
+- Add `bytes_per_second` to distinct_count of stream_compaction nvbench. ([#14172](https://github.com/rapidsai/cudf/pull/14172)) [@Blonck](https://github.com/Blonck)
+- Add `bytes_per_second` to transpose benchmark ([#14170](https://github.com/rapidsai/cudf/pull/14170)) [@Blonck](https://github.com/Blonck)
+- cuDF: Build CUDA 12.0 ARM conda packages. ([#14112](https://github.com/rapidsai/cudf/pull/14112)) [@bdice](https://github.com/bdice)
+- Add `bytes_per_second` to shift benchmark ([#13950](https://github.com/rapidsai/cudf/pull/13950)) [@Blonck](https://github.com/Blonck)
+- Extract `debug_utilities.hpp/cu` from `column_utilities.hpp/cu` ([#13720](https://github.com/rapidsai/cudf/pull/13720)) [@ttnghia](https://github.com/ttnghia)
+
# cuDF 23.10.00 (11 Oct 2023)
## 🚨 Breaking Changes
diff --git a/README.md b/README.md
index 64c980d0cb3..677cfc89d52 100644
--- a/README.md
+++ b/README.md
@@ -1,57 +1,62 @@
#
![](img/rapids_logo.png)
cuDF - GPU DataFrames
-**NOTE:** For the latest stable [README.md](https://github.com/rapidsai/cudf/blob/main/README.md) ensure you are on the `main` branch.
+## 📢 cuDF can now be used as a no-code-change accelerator for pandas! To learn more, see [here](https://rapids.ai/cudf-pandas/)!
-## Resources
-
-- [cuDF Reference Documentation](https://docs.rapids.ai/api/cudf/stable/): Python API reference, tutorials, and topic guides.
-- [libcudf Reference Documentation](https://docs.rapids.ai/api/libcudf/stable/): C/C++ CUDA library API reference.
-- [Getting Started](https://rapids.ai/start.html): Instructions for installing cuDF.
-- [RAPIDS Community](https://rapids.ai/community.html): Get help, contribute, and collaborate.
-- [GitHub repository](https://github.com/rapidsai/cudf): Download the cuDF source code.
-- [Issue tracker](https://github.com/rapidsai/cudf/issues): Report issues or request features.
-
-## Overview
-
-Built based on the [Apache Arrow](http://arrow.apache.org/) columnar memory format, cuDF is a GPU DataFrame library for loading, joining, aggregating, filtering, and otherwise manipulating data.
+cuDF is a GPU DataFrame library for loading joining, aggregating,
+filtering, and otherwise manipulating data. cuDF leverages
+[libcudf](https://docs.rapids.ai/api/libcudf/stable/), a
+blazing-fast C++/CUDA dataframe library and the [Apache
+Arrow](https://arrow.apache.org/) columnar format to provide a
+GPU-accelerated pandas API.
-cuDF provides a pandas-like API that will be familiar to data engineers & data scientists, so they can use it to easily accelerate their workflows without going into the details of CUDA programming.
+You can import `cudf` directly and use it like `pandas`:
-For example, the following snippet downloads a CSV, then uses the GPU to parse it into rows and columns and run calculations:
```python
-import cudf, requests
+import cudf
+import requests
from io import StringIO
url = "https://github.com/plotly/datasets/raw/master/tips.csv"
-content = requests.get(url).content.decode('utf-8')
+content = requests.get(url).content.decode("utf-8")
tips_df = cudf.read_csv(StringIO(content))
-tips_df['tip_percentage'] = tips_df['tip'] / tips_df['total_bill'] * 100
+tips_df["tip_percentage"] = tips_df["tip"] / tips_df["total_bill"] * 100
# display average tip by dining party size
-print(tips_df.groupby('size').tip_percentage.mean())
+print(tips_df.groupby("size").tip_percentage.mean())
```
-Output:
-```
-size
-1 21.729201548727808
-2 16.571919173482897
-3 15.215685473711837
-4 14.594900639351332
-5 14.149548965142023
-6 15.622920072028379
-Name: tip_percentage, dtype: float64
-```
+Or, you can use cuDF as a no-code-change accelerator for pandas, using
+[`cudf.pandas`](https://docs.rapids.ai/api/cudf/stable/cudf_pandas).
+`cudf.pandas` supports 100% of the pandas API, utilizing cuDF for
+supported operations and falling back to pandas when needed:
-For additional examples, browse our complete [API documentation](https://docs.rapids.ai/api/cudf/stable/), or check out our more detailed [notebooks](https://github.com/rapidsai/notebooks-contrib).
+```python
+%load_ext cudf.pandas # pandas operations now use the GPU!
-## Quick Start
+import pandas as pd
+import requests
+from io import StringIO
-Please see the [Demo Docker Repository](https://hub.docker.com/r/rapidsai/rapidsai/), choosing a tag based on the NVIDIA CUDA version you're running. This provides a ready to run Docker container with example notebooks and data, showcasing how you can utilize cuDF.
+url = "https://github.com/plotly/datasets/raw/master/tips.csv"
+content = requests.get(url).content.decode("utf-8")
-## Installation
+tips_df = pd.read_csv(StringIO(content))
+tips_df["tip_percentage"] = tips_df["tip"] / tips_df["total_bill"] * 100
+# display average tip by dining party size
+print(tips_df.groupby("size").tip_percentage.mean())
+```
+
+## Resources
+
+- [Try cudf.pandas now](https://nvda.ws/rapids-cudf): Explore `cudf.pandas` on a free GPU enabled instance on Google Colab!
+- [Install](https://rapids.ai/start.html): Instructions for installing cuDF and other [RAPIDS](https://rapids.ai) libraries.
+- [cudf (Python) documentation](https://docs.rapids.ai/api/cudf/stable/)
+- [libcudf (C++/CUDA) documentation](https://docs.rapids.ai/api/libcudf/stable/)
+- [RAPIDS Community](https://rapids.ai/community.html): Get help, contribute, and collaborate.
+
+## Installation
### CUDA/GPU requirements
@@ -65,7 +70,7 @@ cuDF can be installed with conda (via [miniconda](https://conda.io/miniconda.htm
```bash
conda install -c rapidsai -c conda-forge -c nvidia \
- cudf=23.10 python=3.10 cuda-version=11.8
+ cudf=23.12 python=3.10 cuda-version=11.8
```
We also provide [nightly Conda packages](https://anaconda.org/rapidsai-nightly) built from the HEAD
diff --git a/VERSION b/VERSION
new file mode 100644
index 00000000000..a193fff41e8
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+23.12.00
diff --git a/build.sh b/build.sh
index 2ad69712e5d..e5beb51dedf 100755
--- a/build.sh
+++ b/build.sh
@@ -369,7 +369,7 @@ fi
# build cudf_kafka Python package
if hasArg cudf_kafka; then
cd ${REPODIR}/python/cudf_kafka
- SKBUILD_CONFIGURE_OPTIONS="-DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR}" \
+ SKBUILD_CONFIGURE_OPTIONS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX} -DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR} ${EXTRA_CMAKE_ARGS}" \
SKBUILD_BUILD_OPTIONS="-j${PARALLEL_LEVEL:-1}" \
python -m pip install --no-build-isolation --no-deps .
fi
diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh
index 8b757fecf5a..f1ad8ee7778 100755
--- a/ci/build_cpp.sh
+++ b/ci/build_cpp.sh
@@ -9,10 +9,12 @@ export CMAKE_GENERATOR=Ninja
rapids-print-env
+version=$(rapids-generate-version)
+
rapids-logger "Begin cpp build"
# With boa installed conda build forward to boa
-rapids-conda-retry mambabuild \
+RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
conda/recipes/libcudf
rapids-upload-conda-to-s3 cpp
diff --git a/ci/build_docs.sh b/ci/build_docs.sh
index 9149b5e6bfe..d5b0c9a5edb 100755
--- a/ci/build_docs.sh
+++ b/ci/build_docs.sh
@@ -25,7 +25,7 @@ rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
libcudf cudf dask-cudf
-export RAPIDS_VERSION_NUMBER="23.10"
+export RAPIDS_VERSION_NUMBER="23.12"
export RAPIDS_DOCS_DIR="$(mktemp -d)"
rapids-logger "Build CPP docs"
diff --git a/ci/build_python.sh b/ci/build_python.sh
index 61f160b25f5..32fe7b6b3ce 100755
--- a/ci/build_python.sh
+++ b/ci/build_python.sh
@@ -9,6 +9,15 @@ export CMAKE_GENERATOR=Ninja
rapids-print-env
+package_dir="python"
+version=$(rapids-generate-version)
+commit=$(git rev-parse HEAD)
+
+echo "${version}" > VERSION
+for package_name in cudf dask_cudf cudf_kafka custreamz; do
+ sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" ${package_dir}/${package_name}/${package_name}/_version.py
+done
+
rapids-logger "Begin py build"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
@@ -16,24 +25,24 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
# With boa installed conda build forwards to the boa builder
-rapids-conda-retry mambabuild \
+RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/cudf
-rapids-conda-retry mambabuild \
+RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/dask-cudf
-rapids-conda-retry mambabuild \
+RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cudf_kafka
-rapids-conda-retry mambabuild \
+RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh
index a1d52c55b17..ae1d9c3fb1a 100755
--- a/ci/build_wheel.sh
+++ b/ci/build_wheel.sh
@@ -9,9 +9,8 @@ package_dir=$2
source rapids-configure-sccache
source rapids-date-string
-# Use gha-tools rapids-pip-wheel-version to generate wheel version then
-# update the necessary files
-version_override="$(rapids-pip-wheel-version ${RAPIDS_DATE_STRING})"
+version=$(rapids-generate-version)
+commit=$(git rev-parse HEAD)
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
@@ -22,8 +21,9 @@ PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}"
# Patch project metadata files to include the CUDA version suffix and version override.
pyproject_file="${package_dir}/pyproject.toml"
-sed -i "s/^version = .*/version = \"${version_override}\"/g" ${pyproject_file}
-sed -i "s/^name = .*/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
+sed -i "s/^name = \"${package_name}\"/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
+echo "${version}" > VERSION
+sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" "${package_dir}/${package_name}/_version.py"
# For nightlies we want to ensure that we're pulling in alphas as well. The
# easiest way to do so is to augment the spec with a constraint containing a
@@ -36,6 +36,8 @@ fi
if [[ ${package_name} == "dask_cudf" ]]; then
sed -r -i "s/cudf==(.*)\"/cudf${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file}
+ sed -r -i "s/dask-cuda==(.*)\"/dask-cuda==\1${alpha_spec}\"/g" ${pyproject_file}
+ sed -r -i "s/rapids-dask-dependency==(.*)\"/rapids-dask-dependency==\1${alpha_spec}\"/g" ${pyproject_file}
else
sed -r -i "s/rmm(.*)\"/rmm${PACKAGE_CUDA_SUFFIX}\1${alpha_spec}\"/g" ${pyproject_file}
# ptxcompiler and cubinlinker aren't version constrained
diff --git a/ci/build_wheel_cudf.sh b/ci/build_wheel_cudf.sh
index 1b2285b5f22..456a3a289d1 100755
--- a/ci/build_wheel_cudf.sh
+++ b/ci/build_wheel_cudf.sh
@@ -7,20 +7,10 @@ package_dir="python/cudf"
export SKBUILD_CONFIGURE_OPTIONS="-DCUDF_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF"
-# Force a build using the latest version of the code before this PR
-CUDF_BUILD_BRANCH=${1:-""}
-WHEEL_NAME="cudf"
-if [[ "${CUDF_BUILD_BRANCH}" == "main" ]]; then
- MAIN_COMMIT=$(git merge-base HEAD origin/branch-23.10-xdf)
- git checkout $MAIN_COMMIT
- WHEEL_NAME="${WHEEL_NAME}_${CUDF_BUILD_BRANCH}"
-fi
+./ci/build_wheel.sh cudf ${package_dir}
-./ci/build_wheel.sh ${WHEEL_NAME} ${package_dir}
-
-mkdir -p ${package_dir}/final_dist
python -m auditwheel repair -w ${package_dir}/final_dist ${package_dir}/dist/*
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
-RAPIDS_PY_WHEEL_NAME="${WHEEL_NAME}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 ${package_dir}/final_dist
+RAPIDS_PY_WHEEL_NAME="cudf_${AUDITWHEEL_POLICY}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 ${package_dir}/final_dist
diff --git a/ci/check_style.sh b/ci/check_style.sh
index e96ad8bf1db..a01cf4dcc6b 100755
--- a/ci/check_style.sh
+++ b/ci/check_style.sh
@@ -14,7 +14,7 @@ rapids-dependency-file-generator \
rapids-mamba-retry env create --force -f env.yaml -n checks
conda activate checks
-FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/cmake-format-rapids-cmake.json
+FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.12/cmake-format-rapids-cmake.json
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}
diff --git a/ci/cudf_pandas_scripts/pandas-tests/run.sh b/ci/cudf_pandas_scripts/pandas-tests/run.sh
index 920625b452f..d36b609799b 100755
--- a/ci/cudf_pandas_scripts/pandas-tests/run.sh
+++ b/ci/cudf_pandas_scripts/pandas-tests/run.sh
@@ -8,16 +8,21 @@ PANDAS_TESTS_BRANCH=${1}
rapids-logger "Running Pandas tests using $PANDAS_TESTS_BRANCH branch"
rapids-logger "PR number: $RAPIDS_REF_NAME"
-
-COMMIT=$(git rev-parse HEAD)
-WHEEL_NAME="cudf"
-if [[ "${PANDAS_TESTS_BRANCH}" == "main" ]]; then
- COMMIT=$(git merge-base HEAD origin/branch-23.10-xdf)
- WHEEL_NAME="${WHEEL_NAME}_${PANDAS_TESTS_BRANCH}"
+# Set the manylinux version used for downloading the wheels so that we test the
+# newer ABI wheels on the newer images that support their installation.
+# Need to disable pipefail for the head not to fail, see
+# https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q
+set +o pipefail
+glibc_minor_version=$(ldd --version | head -1 | grep -o "[0-9]\.[0-9]\+" | tail -1 | cut -d '.' -f2)
+set -o pipefail
+manylinux_version="2_17"
+if [[ ${glibc_minor_version} -ge 28 ]]; then
+ manylinux_version="2_28"
fi
+manylinux="manylinux_${manylinux_version}"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
-RAPIDS_PY_WHEEL_NAME="${WHEEL_NAME}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
+RAPIDS_PY_WHEEL_NAME="cudf_${manylinux}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
python -m pip install $(ls ./local-cudf-dep/cudf*.whl)[test,pandas_tests]
git checkout $COMMIT
diff --git a/ci/cudf_pandas_scripts/run_tests.sh b/ci/cudf_pandas_scripts/run_tests.sh
index cc578b50fd0..7eab3221e5e 100755
--- a/ci/cudf_pandas_scripts/run_tests.sh
+++ b/ci/cudf_pandas_scripts/run_tests.sh
@@ -31,8 +31,21 @@ done
if [ "$no_cudf" = true ]; then
echo "Skipping cudf install"
else
+ # Set the manylinux version used for downloading the wheels so that we test the
+ # newer ABI wheels on the newer images that support their installation.
+ # Need to disable pipefail for the head not to fail, see
+ # https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q
+ set +o pipefail
+ glibc_minor_version=$(ldd --version | head -1 | grep -o "[0-9]\.[0-9]\+" | tail -1 | cut -d '.' -f2)
+ set -o pipefail
+ manylinux_version="2_17"
+ if [[ ${glibc_minor_version} -ge 28 ]]; then
+ manylinux_version="2_28"
+ fi
+ manylinux="manylinux_${manylinux_version}"
+
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
- RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
+ RAPIDS_PY_WHEEL_NAME="cudf_${manylinux}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
python -m pip install $(ls ./local-cudf-dep/cudf*.whl)[test,cudf_pandas_tests]
fi
diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh
index eac64fe1a0f..16742465c32 100755
--- a/ci/release/update-version.sh
+++ b/ci/release/update-version.sh
@@ -43,6 +43,7 @@ sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g'
# Python CMakeLists updates
sed_runner 's/'"cudf_version .*)"'/'"cudf_version ${NEXT_FULL_TAG})"'/g' python/cudf/CMakeLists.txt
+sed_runner 's/'"cudf_kafka_version .*)"'/'"cudf_kafka_version ${NEXT_FULL_TAG})"'/g' python/cudf_kafka/CMakeLists.txt
# cpp libcudf_kafka update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' cpp/libcudf_kafka/CMakeLists.txt
@@ -50,17 +51,8 @@ sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g'
# cpp cudf_jni update
sed_runner 's/'"VERSION ${CURRENT_SHORT_TAG}.*"'/'"VERSION ${NEXT_FULL_TAG}"'/g' java/src/main/native/CMakeLists.txt
-# Python __init__.py updates
-sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cudf/cudf/__init__.py
-sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/dask_cudf/dask_cudf/__init__.py
-sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cudf_kafka/cudf_kafka/__init__.py
-sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/custreamz/custreamz/__init__.py
-
-# Python pyproject.toml updates
-sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cudf/pyproject.toml
-sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/dask_cudf/pyproject.toml
-sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cudf_kafka/pyproject.toml
-sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/custreamz/pyproject.toml
+# Centralized version file update
+echo "${NEXT_FULL_TAG}" > VERSION
# Wheel testing script
sed_runner "s/branch-.*/branch-${NEXT_SHORT_TAG}/g" ci/test_wheel_dask_cudf.sh
@@ -89,6 +81,7 @@ DEPENDENCIES=(
kvikio
libkvikio
librmm
+ rapids-dask-dependency
rmm
)
for DEP in "${DEPENDENCIES[@]}"; do
@@ -108,8 +101,7 @@ sed_runner "s/version == ${CURRENT_SHORT_TAG}/version == ${NEXT_SHORT_TAG}/g" RE
sed_runner "s/cudf=${CURRENT_SHORT_TAG}/cudf=${NEXT_SHORT_TAG}/g" README.md
# Libcudf examples update
-sed_runner "s/CUDF_TAG branch-${CURRENT_SHORT_TAG}/CUDF_TAG branch-${NEXT_SHORT_TAG}/" cpp/examples/basic/CMakeLists.txt
-sed_runner "s/CUDF_TAG branch-${CURRENT_SHORT_TAG}/CUDF_TAG branch-${NEXT_SHORT_TAG}/" cpp/examples/strings/CMakeLists.txt
+sed_runner "s/CUDF_TAG branch-${CURRENT_SHORT_TAG}/CUDF_TAG branch-${NEXT_SHORT_TAG}/" cpp/examples/fetch_dependencies.cmake
# CI files
for FILE in .github/workflows/*.yaml; do
diff --git a/ci/test_wheel_cudf.sh b/ci/test_wheel_cudf.sh
index 83e24ab3ff1..8c42651e299 100755
--- a/ci/test_wheel_cudf.sh
+++ b/ci/test_wheel_cudf.sh
@@ -3,8 +3,21 @@
set -eou pipefail
+# Set the manylinux version used for downloading the wheels so that we test the
+# newer ABI wheels on the newer images that support their installation.
+# Need to disable pipefail for the head not to fail, see
+# https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q
+set +o pipefail
+glibc_minor_version=$(ldd --version | head -1 | grep -o "[0-9]\.[0-9]\+" | tail -1 | cut -d '.' -f2)
+set -o pipefail
+manylinux_version="2_17"
+if [[ ${glibc_minor_version} -ge 28 ]]; then
+ manylinux_version="2_28"
+fi
+manylinux="manylinux_${manylinux_version}"
+
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
-RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist
+RAPIDS_PY_WHEEL_NAME="cudf_${manylinux}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/cudf*.whl)[test]
diff --git a/ci/test_wheel_dask_cudf.sh b/ci/test_wheel_dask_cudf.sh
index a0a6fbede13..e9162b816aa 100755
--- a/ci/test_wheel_dask_cudf.sh
+++ b/ci/test_wheel_dask_cudf.sh
@@ -7,13 +7,24 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="dask_cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist
# Download the cudf built in the previous step
-RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
-python -m pip install --no-deps ./local-cudf-dep/cudf*.whl
+# Set the manylinux version used for downloading the wheels so that we test the
+# newer ABI wheels on the newer images that support their installation.
+# Need to disable pipefail for the head not to fail, see
+# https://stackoverflow.com/questions/19120263/why-exit-code-141-with-grep-q
+set +o pipefail
+glibc_minor_version=$(ldd --version | head -1 | grep -o "[0-9]\.[0-9]\+" | tail -1 | cut -d '.' -f2)
+set -o pipefail
+manylinux_version="2_17"
+if [[ ${glibc_minor_version} -ge 28 ]]; then
+ manylinux_version="2_28"
+fi
+manylinux="manylinux_${manylinux_version}"
-# Always install latest dask for testing
-python -m pip install git+https://github.com/dask/dask.git@2023.9.2 git+https://github.com/dask/distributed.git@2023.9.2 git+https://github.com/rapidsai/dask-cuda.git@branch-23.10
+RAPIDS_PY_WHEEL_NAME="cudf_${manylinux}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep
+python -m pip install --no-deps ./local-cudf-dep/cudf*.whl
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/dask_cudf*.whl)[test]
+# Run tests in dask_cudf/tests and dask_cudf/io/tests
python -m pytest -n 8 ./python/dask_cudf/dask_cudf/
diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml
index 27a3a84e3f1..9b85888a7b3 100644
--- a/conda/environments/all_cuda-118_arch-x86_64.yaml
+++ b/conda/environments/all_cuda-118_arch-x86_64.yaml
@@ -24,11 +24,8 @@ dependencies:
- cudatoolkit
- cupy>=12.0.0
- cxx-compiler
-- cython>=3.0.0
-- dask-core==2023.9.2
-- dask-cuda==23.10.*
-- dask==2023.9.2
-- distributed==2023.9.2
+- cython>=3.0.3
+- dask-cuda==23.12.*
- dlpack>=0.5,<0.6.0a0
- doxygen=1.9.1
- fastavro>=0.22.9
@@ -40,14 +37,14 @@ dependencies:
- hypothesis
- identify>=2.5.20
- ipython
-- libarrow==12.0.1.*
+- libarrow-all==14.0.1.*
- libcufile-dev=1.4.0.31
- libcufile=1.4.0.31
- libcurand-dev=10.3.0.86
- libcurand=10.3.0.86
-- libkvikio==23.10.*
+- libkvikio==23.12.*
- librdkafka>=1.9.0,<1.10.0a0
-- librmm==23.10.*
+- librmm==23.12.*
- make
- mimesis>=4.1.0
- moto>=4.0.8
@@ -60,7 +57,7 @@ dependencies:
- numpy>=1.21,<1.25
- numpydoc
- nvcc_linux-64=11.8
-- nvcomp==2.6.1
+- nvcomp==3.0.4
- nvtx>=0.2.1
- packaging
- pandas>=1.3,<1.6.0dev0
@@ -69,9 +66,8 @@ dependencies:
- pre-commit
- protobuf>=4.21,<5
- ptxcompiler
-- pyarrow==12.0.1.*
-- pydata-sphinx-theme
-- pyorc
+- pyarrow==14.0.1.*
+- pydata-sphinx-theme!=0.14.2
- pytest
- pytest-benchmark
- pytest-cases
@@ -81,8 +77,9 @@ dependencies:
- python-snappy>=0.6.0
- python>=3.9,<3.11
- pytorch<1.12.0
+- rapids-dask-dependency==23.12.*
- rich
-- rmm==23.10.*
+- rmm==23.12.*
- s3fs>=2022.3.0
- scikit-build>=0.13.1
- scipy
diff --git a/conda/environments/all_cuda-120_arch-x86_64.yaml b/conda/environments/all_cuda-120_arch-x86_64.yaml
index eb229f15af2..a3eeb3dd99f 100644
--- a/conda/environments/all_cuda-120_arch-x86_64.yaml
+++ b/conda/environments/all_cuda-120_arch-x86_64.yaml
@@ -25,11 +25,8 @@ dependencies:
- cuda-version=12.0
- cupy>=12.0.0
- cxx-compiler
-- cython>=3.0.0
-- dask-core==2023.9.2
-- dask-cuda==23.10.*
-- dask==2023.9.2
-- distributed==2023.9.2
+- cython>=3.0.3
+- dask-cuda==23.12.*
- dlpack>=0.5,<0.6.0a0
- doxygen=1.9.1
- fastavro>=0.22.9
@@ -41,12 +38,12 @@ dependencies:
- hypothesis
- identify>=2.5.20
- ipython
-- libarrow==12.0.1.*
+- libarrow-all==14.0.1.*
- libcufile-dev
- libcurand-dev
-- libkvikio==23.10.*
+- libkvikio==23.12.*
- librdkafka>=1.9.0,<1.10.0a0
-- librmm==23.10.*
+- librmm==23.12.*
- make
- mimesis>=4.1.0
- moto>=4.0.8
@@ -58,7 +55,7 @@ dependencies:
- numba>=0.57,<0.58
- numpy>=1.21,<1.25
- numpydoc
-- nvcomp==2.6.1
+- nvcomp==3.0.4
- nvtx>=0.2.1
- packaging
- pandas>=1.3,<1.6.0dev0
@@ -66,9 +63,8 @@ dependencies:
- pip
- pre-commit
- protobuf>=4.21,<5
-- pyarrow==12.0.1.*
-- pydata-sphinx-theme
-- pyorc
+- pyarrow==14.0.1.*
+- pydata-sphinx-theme!=0.14.2
- pytest
- pytest-benchmark
- pytest-cases
@@ -78,8 +74,9 @@ dependencies:
- python-snappy>=0.6.0
- python>=3.9,<3.11
- pytorch<1.12.0
+- rapids-dask-dependency==23.12.*
- rich
-- rmm==23.10.*
+- rmm==23.12.*
- s3fs>=2022.3.0
- scikit-build>=0.13.1
- scipy
diff --git a/conda/recipes/cudf/meta.yaml b/conda/recipes/cudf/meta.yaml
index d3e15f70ccb..27edde1c98a 100644
--- a/conda/recipes/cudf/meta.yaml
+++ b/conda/recipes/cudf/meta.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
-{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
+{% 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]) %}
@@ -12,7 +12,7 @@ package:
version: {{ version }}
source:
- git_url: ../../..
+ path: ../../..
build:
number: {{ GIT_DESCRIBE_NUMBER }}
@@ -55,13 +55,13 @@ requirements:
- cuda-version ={{ cuda_version }}
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- - protobuf ==4.21.*
+ - protobuf ==4.24.*
- python
- - cython >=3.0.0
+ - cython >=3.0.3
- scikit-build >=0.13.1
- setuptools
- dlpack >=0.5,<0.6.0a0
- - pyarrow =12
+ - pyarrow ==14.0.1.*
- libcudf ={{ version }}
- rmm ={{ minor_version }}
{% if cuda_major == "11" %}
@@ -82,7 +82,7 @@ requirements:
- numba >=0.57,<0.58
# TODO: Pin to numpy<1.25 until cudf requires pandas 2
- numpy >=1.21,<1.25
- - {{ pin_compatible('pyarrow', max_pin='x.x.x') }}
+ - {{ pin_compatible('pyarrow', max_pin='x') }}
- libcudf ={{ version }}
- {{ pin_compatible('rmm', max_pin='x.x') }}
- fsspec >=0.6.0
diff --git a/conda/recipes/cudf_kafka/build.sh b/conda/recipes/cudf_kafka/build.sh
index f4bb6e1bc91..9458349d101 100644
--- a/conda/recipes/cudf_kafka/build.sh
+++ b/conda/recipes/cudf_kafka/build.sh
@@ -1,16 +1,3 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
-# This assumes the script is executed from the root of the repo directory
-# Need to set CUDA_HOME inside conda environments because the hacked together
-# setup.py for cudf-kafka searches that way.
-# TODO: Remove after https://github.com/rapidsai/cudf/pull/14292 updates
-# cudf_kafka to use scikit-build
-CUDA_MAJOR=${RAPIDS_CUDA_VERSION%%.*}
-if [[ ${CUDA_MAJOR} == "12" ]]; then
- target_name="x86_64-linux"
- if [[ ! $(arch) == "x86_64" ]]; then
- target_name="sbsa-linux"
- fi
- export CUDA_HOME="${PREFIX}/targets/${target_name}/"
-fi
./build.sh -v cudf_kafka
diff --git a/conda/recipes/cudf_kafka/conda_build_config.yaml b/conda/recipes/cudf_kafka/conda_build_config.yaml
index b63a136ad2d..c98c2701653 100644
--- a/conda/recipes/cudf_kafka/conda_build_config.yaml
+++ b/conda/recipes/cudf_kafka/conda_build_config.yaml
@@ -9,3 +9,9 @@ sysroot_version:
cmake_version:
- ">=3.26.4"
+
+cuda_compiler:
+ - cuda-nvcc
+
+cuda11_compiler:
+ - nvcc
diff --git a/conda/recipes/cudf_kafka/meta.yaml b/conda/recipes/cudf_kafka/meta.yaml
index a79c23b7d98..343ec2519f1 100644
--- a/conda/recipes/cudf_kafka/meta.yaml
+++ b/conda/recipes/cudf_kafka/meta.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
-{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
+{% 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]) %}
@@ -12,7 +12,7 @@ package:
version: {{ version }}
source:
- git_url: ../../..
+ path: ../../..
build:
number: {{ GIT_DESCRIBE_NUMBER }}
@@ -33,28 +33,31 @@ build:
- SCCACHE_S3_KEY_PREFIX=cudf-kafka-linux64 # [linux64]
- SCCACHE_S3_USE_SSL
- SCCACHE_S3_NO_CREDENTIALS
- # TODO: Remove after https://github.com/rapidsai/cudf/pull/14292 updates
- # cudf_kafka to use scikit-build
- - RAPIDS_CUDA_VERSION
+ ignore_run_exports_from:
+ {% if cuda_major == "11" %}
+ - {{ compiler('cuda11') }}
+ {% endif %}
requirements:
build:
- cmake {{ cmake_version }}
+ - ninja
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- - ninja
- - sysroot_{{ target_platform }} {{ sysroot_version }}
- # TODO: Remove after https://github.com/rapidsai/cudf/pull/14292 updates
- # cudf_kafka to use scikit-build
- {% if cuda_major == "12" %}
- - cuda-gdb
+ {% if cuda_major == "11" %}
+ - {{ compiler('cuda11') }} ={{ cuda_version }}
+ {% else %}
+ - {{ compiler('cuda') }}
{% endif %}
+ - cuda-version ={{ cuda_version }}
+ - sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- python
- - cython >=3.0.0
+ - cython >=3.0.3
- cuda-version ={{ cuda_version }}
- cudf ={{ version }}
- libcudf_kafka ={{ version }}
+ - scikit-build >=0.13.1
- setuptools
{% if cuda_major == "12" %}
- cuda-cudart-dev
diff --git a/conda/recipes/custreamz/meta.yaml b/conda/recipes/custreamz/meta.yaml
index 233d51baf31..755394e3936 100644
--- a/conda/recipes/custreamz/meta.yaml
+++ b/conda/recipes/custreamz/meta.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
-{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
+{% 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]) %}
@@ -12,7 +12,7 @@ package:
version: {{ version }}
source:
- git_url: ../../..
+ path: ../../..
build:
number: {{ GIT_DESCRIBE_NUMBER }}
@@ -45,9 +45,7 @@ requirements:
- streamz
- cudf ={{ version }}
- cudf_kafka ={{ version }}
- - dask ==2023.9.2
- - dask-core ==2023.9.2
- - distributed ==2023.9.2
+ - rapids-dask-dependency ={{ minor_version }}
- python-confluent-kafka >=1.9.0,<1.10.0a0
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
diff --git a/conda/recipes/dask-cudf/meta.yaml b/conda/recipes/dask-cudf/meta.yaml
index 4c8af071074..16638926492 100644
--- a/conda/recipes/dask-cudf/meta.yaml
+++ b/conda/recipes/dask-cudf/meta.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
-{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
+{% 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]) %}
@@ -12,7 +12,7 @@ package:
version: {{ version }}
source:
- git_url: ../../..
+ path: ../../..
build:
number: {{ GIT_DESCRIBE_NUMBER }}
@@ -37,17 +37,11 @@ build:
requirements:
host:
- python
- - cudf ={{ version }}
- - dask ==2023.9.2
- - dask-core ==2023.9.2
- - distributed ==2023.9.2
- cuda-version ={{ cuda_version }}
run:
- python
- cudf ={{ version }}
- - dask ==2023.9.2
- - dask-core ==2023.9.2
- - distributed ==2023.9.2
+ - rapids-dask-dependency ={{ minor_version }}
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
test:
diff --git a/conda/recipes/dask-cudf/run_test.sh b/conda/recipes/dask-cudf/run_test.sh
deleted file mode 100644
index c79c014a89a..00000000000
--- a/conda/recipes/dask-cudf/run_test.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2020-2023, NVIDIA CORPORATION.
-
-set -e
-
-# Logger function for build status output
-function logger() {
- echo -e "\n>>>> $@\n"
-}
-
-# Importing cudf on arm64 CPU only nodes is currently not working due to a
-# difference in reported gpu devices between arm64 and amd64
-ARCH=$(arch)
-
-if [ "${ARCH}" = "aarch64" ]; then
- logger "Skipping tests on arm64"
- exit 0
-fi
-
-# Dask & Distributed option to install main(nightly) or `conda-forge` packages.
-export INSTALL_DASK_MAIN=0
-
-# Dask version to install when `INSTALL_DASK_MAIN=0`
-export DASK_STABLE_VERSION="2023.9.2"
-
-# Install the conda-forge or nightly version of dask and distributed
-if [[ "${INSTALL_DASK_MAIN}" == 1 ]]; then
- rapids-logger "rapids-mamba-retry install -c dask/label/dev 'dask/label/dev::dask' 'dask/label/dev::distributed'"
- rapids-mamba-retry install -c dask/label/dev "dask/label/dev::dask" "dask/label/dev::distributed"
-else
- rapids-logger "rapids-mamba-retry install conda-forge::dask=={$DASK_STABLE_VERSION} conda-forge::distributed=={$DASK_STABLE_VERSION} conda-forge::dask-core=={$DASK_STABLE_VERSION} --force-reinstall"
- rapids-mamba-retry install conda-forge::dask=={$DASK_STABLE_VERSION} conda-forge::distributed=={$DASK_STABLE_VERSION} conda-forge::dask-core=={$DASK_STABLE_VERSION} --force-reinstall
-fi
-
-logger "python -c 'import dask_cudf'"
-python -c "import dask_cudf"
diff --git a/conda/recipes/libcudf/conda_build_config.yaml b/conda/recipes/libcudf/conda_build_config.yaml
index 25b3f19de77..fa06ed048b7 100644
--- a/conda/recipes/libcudf/conda_build_config.yaml
+++ b/conda/recipes/libcudf/conda_build_config.yaml
@@ -23,7 +23,7 @@ gtest_version:
- ">=1.13.0"
libarrow_version:
- - "=12"
+ - "==14.0.1"
dlpack_version:
- ">=0.5,<0.6.0a0"
@@ -38,7 +38,7 @@ spdlog_version:
- ">=1.11.0,<1.12"
nvcomp_version:
- - "=2.6.1"
+ - "=3.0.4"
zlib_version:
- ">=1.2.13"
diff --git a/conda/recipes/libcudf/meta.yaml b/conda/recipes/libcudf/meta.yaml
index 627065817ba..0459908fd00 100644
--- a/conda/recipes/libcudf/meta.yaml
+++ b/conda/recipes/libcudf/meta.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
-{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
+{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
@@ -11,7 +11,7 @@ package:
name: libcudf-split
source:
- git_url: ../../..
+ path: ../../..
build:
script_env:
@@ -91,6 +91,8 @@ outputs:
requirements:
build:
- cmake {{ cmake_version }}
+ host:
+ - libarrow {{ libarrow_version }}
run:
{% if cuda_major == "11" %}
- cudatoolkit
@@ -103,7 +105,6 @@ outputs:
- nvcomp {{ nvcomp_version }}
- librmm ={{ minor_version }}
- libkvikio ={{ minor_version }}
- - libarrow {{ libarrow_version }}
- dlpack {{ dlpack_version }}
- gtest {{ gtest_version }}
- gmock {{ gtest_version }}
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index ec58c391001..bd9c936626a 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -25,7 +25,7 @@ rapids_cuda_init_architectures(CUDF)
project(
CUDF
- VERSION 23.10.00
+ VERSION 23.12.00
LANGUAGES C CXX CUDA
)
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.5)
@@ -401,6 +401,7 @@ add_library(
src/io/parquet/predicate_pushdown.cpp
src/io/parquet/reader.cpp
src/io/parquet/reader_impl.cpp
+ src/io/parquet/reader_impl_chunking.cu
src/io/parquet/reader_impl_helpers.cpp
src/io/parquet/reader_impl_preprocess.cu
src/io/parquet/writer_impl.cu
@@ -439,6 +440,7 @@ add_library(
src/join/mixed_join_size_kernel_nulls.cu
src/join/mixed_join_size_kernels_semi.cu
src/join/semi_join.cu
+ src/json/json_path.cu
src/lists/contains.cu
src/lists/combine/concatenate_list_elements.cu
src/lists/combine/concatenate_rows.cu
@@ -570,7 +572,6 @@ add_library(
src/strings/filter_chars.cu
src/strings/like.cu
src/strings/padding.cu
- src/strings/json/json_path.cu
src/strings/regex/regcomp.cpp
src/strings/regex/regexec.cpp
src/strings/regex/regex_program.cpp
@@ -581,6 +582,7 @@ add_library(
src/strings/replace/replace.cu
src/strings/replace/replace_re.cu
src/strings/reverse.cu
+ src/strings/scan/scan_inclusive.cu
src/strings/search/findall.cu
src/strings/search/find.cu
src/strings/search/find_multiple.cu
@@ -597,6 +599,7 @@ add_library(
src/strings/utilities.cu
src/strings/wrap.cu
src/structs/copying/concatenate.cu
+ src/structs/scan/scan_inclusive.cu
src/structs/structs_column_factories.cu
src/structs/structs_column_view.cpp
src/structs/utilities.cpp
@@ -613,10 +616,10 @@ add_library(
src/text/normalize.cu
src/text/replace.cu
src/text/stemmer.cu
- src/text/subword/bpe_tokenizer.cu
+ src/text/bpe/byte_pair_encoding.cu
+ src/text/bpe/load_merge_pairs.cu
src/text/subword/data_normalizer.cu
src/text/subword/load_hash_file.cu
- src/text/subword/load_merges_file.cu
src/text/subword/subword_tokenize.cu
src/text/subword/wordpiece_tokenizer.cu
src/text/tokenize.cu
@@ -834,6 +837,7 @@ if(CUDF_BUILD_TESTUTIL)
tests/io/metadata_utilities.cpp
tests/utilities/base_fixture.cpp
tests/utilities/column_utilities.cu
+ tests/utilities/debug_utilities.cu
tests/utilities/table_utilities.cu
tests/utilities/tdigest_utilities.cu
)
diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt
index cd6b3cfdc03..9c3a05a2f5f 100644
--- a/cpp/benchmarks/CMakeLists.txt
+++ b/cpp/benchmarks/CMakeLists.txt
@@ -230,6 +230,7 @@ ConfigureNVBench(HASHING_NVBENCH hashing/hash.cpp)
# ##################################################################################################
# * merge benchmark -------------------------------------------------------------------------------
ConfigureBench(MERGE_BENCH merge/merge.cpp)
+ConfigureNVBench(MERGE_NVBENCH merge/merge_structs.cpp merge/merge_lists.cpp)
# ##################################################################################################
# * null_mask benchmark ---------------------------------------------------------------------------
@@ -277,7 +278,7 @@ ConfigureBench(TEXT_BENCH text/ngrams.cpp text/subword.cpp)
ConfigureNVBench(
TEXT_NVBENCH text/edit_distance.cpp text/hash_ngrams.cpp text/jaccard.cpp text/minhash.cpp
- text/normalize.cpp text/replace.cpp text/tokenize.cpp
+ text/normalize.cpp text/replace.cpp text/tokenize.cpp text/vocab.cpp
)
# ##################################################################################################
@@ -319,7 +320,7 @@ ConfigureNVBench(
# ##################################################################################################
# * json benchmark -------------------------------------------------------------------
-ConfigureBench(JSON_BENCH string/json.cu)
+ConfigureBench(JSON_BENCH json/json.cu)
ConfigureNVBench(FST_NVBENCH io/fst.cu)
ConfigureNVBench(JSON_READER_NVBENCH io/json/nested_json.cpp io/json/json_reader_input.cpp)
ConfigureNVBench(JSON_WRITER_NVBENCH io/json/json_writer.cpp)
diff --git a/cpp/benchmarks/sort/nested_types_common.hpp b/cpp/benchmarks/common/generate_nested_types.hpp
similarity index 98%
rename from cpp/benchmarks/sort/nested_types_common.hpp
rename to cpp/benchmarks/common/generate_nested_types.hpp
index 93853ba5768..ee9e3ca9de3 100644
--- a/cpp/benchmarks/sort/nested_types_common.hpp
+++ b/cpp/benchmarks/common/generate_nested_types.hpp
@@ -16,7 +16,7 @@
#pragma once
-#include
+#include "generate_input.hpp"
#include
diff --git a/cpp/benchmarks/copying/shift.cu b/cpp/benchmarks/copying/shift.cu
index 460100a8fe9..e1169e3bcd6 100644
--- a/cpp/benchmarks/copying/shift.cu
+++ b/cpp/benchmarks/copying/shift.cu
@@ -56,18 +56,32 @@ static void BM_shift(benchmark::State& state)
cudf::size_type size = state.range(0);
cudf::size_type offset = size * (static_cast(shift_factor) / 100.0);
- auto const input_table =
- create_sequence_table({cudf::type_to_id()},
- row_count{size},
- use_validity ? std::optional{1.0} : std::nullopt);
+ auto constexpr column_type_id = cudf::type_id::INT32;
+ using column_type = cudf::id_to_type;
+
+ auto const input_table = create_sequence_table(
+ {column_type_id}, row_count{size}, use_validity ? std::optional{1.0} : std::nullopt);
cudf::column_view input{input_table->get_column(0)};
- auto fill = use_validity ? make_scalar() : make_scalar(777);
+ auto fill = use_validity ? make_scalar() : make_scalar(777);
for (auto _ : state) {
cuda_event_timer raii(state, true);
auto output = cudf::shift(input, offset, *fill);
}
+
+ auto const elems_read = (size - offset);
+ auto const bytes_read = elems_read * sizeof(column_type);
+
+ // If 'use_validity' is false, the fill value is a number, and the entire column
+ // (excluding the null bitmask) needs to be written. On the other hand, if 'use_validity'
+ // is true, only the elements that can be shifted are written, along with the full null bitmask.
+ auto const elems_written = use_validity ? (size - offset) : size;
+ auto const bytes_written = elems_written * sizeof(column_type);
+ auto const null_bytes = use_validity ? 2 * cudf::bitmask_allocation_size_bytes(size) : 0;
+
+ state.SetBytesProcessed(static_cast(state.iterations()) *
+ (bytes_written + bytes_read + null_bytes));
}
class Shift : public cudf::benchmark {};
diff --git a/cpp/benchmarks/string/json.cu b/cpp/benchmarks/json/json.cu
similarity index 98%
rename from cpp/benchmarks/string/json.cu
rename to cpp/benchmarks/json/json.cu
index 7e89edf3e17..5dc30aebe38 100644
--- a/cpp/benchmarks/string/json.cu
+++ b/cpp/benchmarks/json/json.cu
@@ -21,9 +21,9 @@
#include
#include
+#include
#include
#include
-#include
#include
#include
#include
@@ -196,7 +196,7 @@ void BM_case(benchmark::State& state, std::string query_arg)
for (auto _ : state) {
cuda_event_timer raii(state, true);
- auto result = cudf::strings::get_json_object(scv, json_path);
+ auto result = cudf::get_json_object(scv, json_path);
CUDF_CUDA_TRY(cudaStreamSynchronize(0));
}
diff --git a/cpp/benchmarks/lists/set_operations.cpp b/cpp/benchmarks/lists/set_operations.cpp
index 5b240923358..6bed33d2570 100644
--- a/cpp/benchmarks/lists/set_operations.cpp
+++ b/cpp/benchmarks/lists/set_operations.cpp
@@ -54,6 +54,7 @@ void nvbench_set_op(nvbench::state& state, BenchFuncPtr bfunc)
cudf::lists_column_view{*rhs},
cudf::null_equality::EQUAL,
cudf::nan_equality::ALL_EQUAL,
+ cudf::get_default_stream(),
rmm::mr::get_current_device_resource());
});
}
diff --git a/cpp/benchmarks/merge/merge_lists.cpp b/cpp/benchmarks/merge/merge_lists.cpp
new file mode 100644
index 00000000000..bcb9f10ac83
--- /dev/null
+++ b/cpp/benchmarks/merge/merge_lists.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2023, 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
+
+#include
+#include
+
+#include
+
+void nvbench_merge_list(nvbench::state& state)
+{
+ rmm::cuda_stream_view stream;
+
+ auto const input1 = create_lists_data(state);
+ auto const sorted_input1 =
+ cudf::detail::sort(*input1, {}, {}, stream, rmm::mr::get_current_device_resource());
+
+ auto const input2 = create_lists_data(state);
+ auto const sorted_input2 =
+ cudf::detail::sort(*input2, {}, {}, stream, rmm::mr::get_current_device_resource());
+
+ stream.synchronize();
+
+ state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
+ rmm::cuda_stream_view stream_view{launch.get_stream()};
+
+ cudf::detail::merge({*sorted_input1, *sorted_input2},
+ {0},
+ {cudf::order::ASCENDING},
+ {},
+ stream_view,
+ rmm::mr::get_current_device_resource());
+ });
+}
+
+NVBENCH_BENCH(nvbench_merge_list)
+ .set_name("merge_lists")
+ .add_int64_power_of_two_axis("size_bytes", {10, 18, 24, 28})
+ .add_int64_axis("depth", {1, 4})
+ .add_float64_axis("null_frequency", {0, 0.2});
diff --git a/cpp/benchmarks/merge/merge_structs.cpp b/cpp/benchmarks/merge/merge_structs.cpp
new file mode 100644
index 00000000000..9c56b44b623
--- /dev/null
+++ b/cpp/benchmarks/merge/merge_structs.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2023, 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
+
+#include
+#include
+
+#include
+
+void nvbench_merge_struct(nvbench::state& state)
+{
+ rmm::cuda_stream_view stream;
+
+ auto const input1 = create_structs_data(state);
+ auto const sorted_input1 =
+ cudf::detail::sort(*input1, {}, {}, stream, rmm::mr::get_current_device_resource());
+
+ auto const input2 = create_structs_data(state);
+ auto const sorted_input2 =
+ cudf::detail::sort(*input2, {}, {}, stream, rmm::mr::get_current_device_resource());
+
+ stream.synchronize();
+
+ state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
+ rmm::cuda_stream_view stream_view{launch.get_stream()};
+
+ cudf::detail::merge({*sorted_input1, *sorted_input2},
+ {0},
+ {cudf::order::ASCENDING},
+ {},
+ stream_view,
+ rmm::mr::get_current_device_resource());
+ });
+}
+
+NVBENCH_BENCH(nvbench_merge_struct)
+ .set_name("merge_struct")
+ .add_int64_power_of_two_axis("NumRows", {10, 18, 26})
+ .add_int64_axis("Depth", {0, 1, 8})
+ .add_int64_axis("Nulls", {0, 1});
diff --git a/cpp/benchmarks/sort/rank_lists.cpp b/cpp/benchmarks/sort/rank_lists.cpp
index 49dc409ebfc..c23f3c891f0 100644
--- a/cpp/benchmarks/sort/rank_lists.cpp
+++ b/cpp/benchmarks/sort/rank_lists.cpp
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-#include "nested_types_common.hpp"
#include "rank_types_common.hpp"
+#include
+
#include
#include
diff --git a/cpp/benchmarks/sort/rank_structs.cpp b/cpp/benchmarks/sort/rank_structs.cpp
index 85427e2128f..271b883e62a 100644
--- a/cpp/benchmarks/sort/rank_structs.cpp
+++ b/cpp/benchmarks/sort/rank_structs.cpp
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#include "nested_types_common.hpp"
#include "rank_types_common.hpp"
+#include
#include
diff --git a/cpp/benchmarks/sort/sort_lists.cpp b/cpp/benchmarks/sort/sort_lists.cpp
index 4b04323a99f..2052de3688c 100644
--- a/cpp/benchmarks/sort/sort_lists.cpp
+++ b/cpp/benchmarks/sort/sort_lists.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "nested_types_common.hpp"
+#include
#include
diff --git a/cpp/benchmarks/sort/sort_structs.cpp b/cpp/benchmarks/sort/sort_structs.cpp
index 1d54fa42f6f..3a3d1080ba0 100644
--- a/cpp/benchmarks/sort/sort_structs.cpp
+++ b/cpp/benchmarks/sort/sort_structs.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "nested_types_common.hpp"
+#include
#include
diff --git a/cpp/benchmarks/stream_compaction/distinct_count.cpp b/cpp/benchmarks/stream_compaction/distinct_count.cpp
index 2b2c901b90f..3e324013d4e 100644
--- a/cpp/benchmarks/stream_compaction/distinct_count.cpp
+++ b/cpp/benchmarks/stream_compaction/distinct_count.cpp
@@ -40,6 +40,14 @@ static void bench_distinct_count(nvbench::state& state, nvbench::type_list
auto const& data_column = data_table->get_column(0);
auto const input_table = cudf::table_view{{data_column, data_column, data_column}};
+ // Collect memory statistics for input and output.
+ state.add_global_memory_reads(input_table.num_rows() * input_table.num_columns());
+ state.add_global_memory_writes(1);
+ if (null_probability > 0) {
+ state.add_global_memory_reads(
+ input_table.num_columns() * cudf::bitmask_allocation_size_bytes(input_table.num_rows()));
+ }
+
auto mem_stats_logger = cudf::memory_stats_logger(); // init stats logger
state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
diff --git a/cpp/benchmarks/text/vocab.cpp b/cpp/benchmarks/text/vocab.cpp
new file mode 100644
index 00000000000..80942e2697d
--- /dev/null
+++ b/cpp/benchmarks/text/vocab.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2023, 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
+#include
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+static void bench_vocab_tokenize(nvbench::state& state)
+{
+ auto const num_rows = static_cast(state.get_int64("num_rows"));
+ auto const row_width = static_cast(state.get_int64("row_width"));
+
+ if (static_cast(num_rows) * static_cast(row_width) >=
+ static_cast(std::numeric_limits::max())) {
+ state.skip("Skip benchmarks greater than size_type limit");
+ }
+
+ auto const column = [num_rows, row_width] {
+ data_profile const profile = data_profile_builder().no_validity().distribution(
+ cudf::type_id::STRING, distribution_id::NORMAL, 0, row_width);
+ auto const col = create_random_column(cudf::type_id::STRING, row_count{num_rows}, profile);
+ return cudf::strings::filter_characters_of_type(
+ cudf::strings_column_view(col->view()),
+ cudf::strings::string_character_types::ALL_TYPES,
+ cudf::string_scalar(" "),
+ cudf::strings::string_character_types::ALPHANUM);
+ }();
+ cudf::strings_column_view input(column->view());
+
+ auto const vocab_col = [] {
+ data_profile const profile = data_profile_builder().no_validity().distribution(
+ cudf::type_id::STRING, distribution_id::NORMAL, 0, 15);
+ auto const col = create_random_column(cudf::type_id::STRING, row_count{100}, profile);
+ return cudf::strings::filter_characters_of_type(
+ cudf::strings_column_view(col->view()),
+ cudf::strings::string_character_types::ALL_TYPES,
+ cudf::string_scalar(""),
+ cudf::strings::string_character_types::ALPHANUM);
+ }();
+ auto const vocab = nvtext::load_vocabulary(cudf::strings_column_view(vocab_col->view()));
+
+ auto token_count = [input] {
+ auto const counts = nvtext::count_tokens(input);
+ auto const agg = cudf::make_sum_aggregation();
+ auto const count = cudf::reduce(counts->view(), *agg, counts->type());
+ return static_cast*>(count.get())
+ ->value(cudf::get_default_stream());
+ }();
+
+ state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
+ auto chars_size = input.chars_size() + cudf::strings_column_view(vocab_col->view()).chars_size();
+ state.add_global_memory_reads(chars_size);
+ state.add_global_memory_writes(token_count);
+
+ auto const delimiter = cudf::string_scalar("");
+ state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
+ auto result = nvtext::tokenize_with_vocabulary(input, *vocab, delimiter);
+ });
+}
+
+NVBENCH_BENCH(bench_vocab_tokenize)
+ .set_name("vocab_tokenize")
+ .add_int64_axis("row_width", {32, 64, 128, 256, 512, 1024})
+ .add_int64_axis("num_rows", {262144, 524288, 1048576, 2097152, 4194304, 16777216});
diff --git a/cpp/benchmarks/transpose/transpose.cpp b/cpp/benchmarks/transpose/transpose.cpp
index 2f41bda4b88..c2737325462 100644
--- a/cpp/benchmarks/transpose/transpose.cpp
+++ b/cpp/benchmarks/transpose/transpose.cpp
@@ -20,17 +20,19 @@
#include
#include
#include
+#include
#include
#include
static void BM_transpose(benchmark::State& state)
{
- auto count = state.range(0);
+ auto count = state.range(0);
+ constexpr auto column_type_id = cudf::type_id::INT32;
auto int_column_generator =
thrust::make_transform_iterator(thrust::counting_iterator(0), [count](int i) {
return cudf::make_numeric_column(
- cudf::data_type{cudf::type_id::INT32}, count, cudf::mask_state::ALL_VALID);
+ cudf::data_type{column_type_id}, count, cudf::mask_state::ALL_VALID);
});
auto input_table = cudf::table(std::vector(int_column_generator, int_column_generator + count));
@@ -40,6 +42,17 @@ static void BM_transpose(benchmark::State& state)
cuda_event_timer raii(state, true);
auto output = cudf::transpose(input);
}
+
+ // Collect memory statistics.
+ auto const bytes_read = static_cast(input.num_columns()) * input.num_rows() *
+ sizeof(cudf::id_to_type);
+ auto const bytes_written = bytes_read;
+ // Account for nullability in input and output.
+ auto const null_bytes = 2 * static_cast(input.num_columns()) *
+ cudf::bitmask_allocation_size_bytes(input.num_rows());
+
+ state.SetBytesProcessed(static_cast(state.iterations()) *
+ (bytes_read + bytes_written + null_bytes));
}
class Transpose : public cudf::benchmark {};
diff --git a/cpp/cmake/thirdparty/get_arrow.cmake b/cpp/cmake/thirdparty/get_arrow.cmake
index 894dc9649e2..05aa5730b4d 100644
--- a/cpp/cmake/thirdparty/get_arrow.cmake
+++ b/cpp/cmake/thirdparty/get_arrow.cmake
@@ -53,19 +53,35 @@ function(find_libarrow_in_python_wheel PYARROW_VERSION)
find_package(Arrow ${PYARROW_VERSION} MODULE REQUIRED GLOBAL)
add_library(arrow_shared ALIAS Arrow::Arrow)
- # When using the libarrow inside a wheel we must build libcudf with the old ABI because pyarrow's
- # `libarrow.so` is compiled for manylinux2014 (centos7 toolchain) which uses the old ABI. Note
- # that these flags will often be redundant because we build wheels in manylinux containers that
- # actually have the old libc++ anyway, but setting them explicitly ensures correct and consistent
- # behavior in all other cases such as aarch builds on newer manylinux or testing builds in newer
- # containers. Note that tests will not build successfully without also propagating these options
- # to builds of GTest. Similarly, benchmarks will not work without updating GBench (and possibly
- # NVBench) builds. We are currently ignoring these limitations since we don't anticipate using
- # this feature except for building wheels.
- target_compile_options(
- Arrow::Arrow INTERFACE "$<$:-D_GLIBCXX_USE_CXX11_ABI=0>"
- "$<$:-Xcompiler=-D_GLIBCXX_USE_CXX11_ABI=0>"
+ # When using the libarrow inside a wheel, whether or not libcudf may be built using the new C++11
+ # ABI is dependent on whether the libarrow inside the wheel was compiled using that ABI because we
+ # need the arrow library that we bundle in cudf to be ABI-compatible with the one inside pyarrow.
+ # We determine what options to use by checking the glibc version on the current system, which is
+ # also how pip determines which manylinux-versioned pyarrow wheel to install. Note that tests will
+ # not build successfully without also propagating these options to builds of GTest. Similarly,
+ # benchmarks will not work without updating GBench (and possibly NVBench) builds. We are currently
+ # ignoring these limitations since we don't anticipate using this feature except for building
+ # wheels.
+ EXECUTE_PROCESS(
+ COMMAND ${CMAKE_C_COMPILER} -print-file-name=libc.so.6
+ OUTPUT_VARIABLE GLIBC_EXECUTABLE
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ EXECUTE_PROCESS(
+ COMMAND ${GLIBC_EXECUTABLE}
+ OUTPUT_VARIABLE GLIBC_OUTPUT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
)
+ STRING(REGEX MATCH "stable release version ([0-9]+\\.[0-9]+)" GLIBC_VERSION ${GLIBC_OUTPUT})
+ STRING(REPLACE "stable release version " "" GLIBC_VERSION ${GLIBC_VERSION})
+ STRING(REPLACE "." ";" GLIBC_VERSION_LIST ${GLIBC_VERSION})
+ LIST(GET GLIBC_VERSION_LIST 1 GLIBC_VERSION_MINOR)
+ if(GLIBC_VERSION_MINOR LESS 28)
+ target_compile_options(
+ Arrow::Arrow INTERFACE "$<$:-D_GLIBCXX_USE_CXX11_ABI=0>"
+ "$<$:-Xcompiler=-D_GLIBCXX_USE_CXX11_ABI=0>"
+ )
+ endif()
rapids_export_package(BUILD Arrow cudf-exports)
rapids_export_package(INSTALL Arrow cudf-exports)
@@ -387,11 +403,19 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
endif()
include("${rapids-cmake-dir}/export/find_package_root.cmake")
- rapids_export_find_package_root(BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
- if(ENABLE_PARQUET)
- rapids_export_find_package_root(BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
- rapids_export_find_package_root(BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
- endif()
+ rapids_export_find_package_root(
+ BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports
+ )
+ rapids_export_find_package_root(
+ BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=]
+ EXPORT_SET cudf-exports
+ CONDITION ENABLE_PARQUET
+ )
+ rapids_export_find_package_root(
+ BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=]
+ EXPORT_SET cudf-exports
+ CONDITION ENABLE_PARQUET
+ )
set(ARROW_LIBRARIES
"${ARROW_LIBRARIES}"
@@ -403,7 +427,7 @@ if(NOT DEFINED CUDF_VERSION_Arrow)
set(CUDF_VERSION_Arrow
# This version must be kept in sync with the libarrow version pinned for builds in
# dependencies.yaml.
- 12.0.1
+ 14.0.1
CACHE STRING "The version of Arrow to find (or build)"
)
endif()
diff --git a/cpp/cmake/thirdparty/get_cufile.cmake b/cpp/cmake/thirdparty/get_cufile.cmake
index c0235eba508..bfdff3a99ff 100644
--- a/cpp/cmake/thirdparty/get_cufile.cmake
+++ b/cpp/cmake/thirdparty/get_cufile.cmake
@@ -21,10 +21,10 @@ function(find_and_configure_cufile)
if(cuFile_FOUND AND NOT BUILD_SHARED_LIBS)
include("${rapids-cmake-dir}/export/find_package_file.cmake")
rapids_export_find_package_file(
- BUILD "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" cudf-exports
+ BUILD "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" EXPORT_SET cudf-exports
)
rapids_export_find_package_file(
- INSTALL "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" cudf-exports
+ INSTALL "${CUDF_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake" EXPORT_SET cudf-exports
)
endif()
endfunction()
diff --git a/cpp/cmake/thirdparty/get_gtest.cmake b/cpp/cmake/thirdparty/get_gtest.cmake
index 1363f43fae2..cfb219448f1 100644
--- a/cpp/cmake/thirdparty/get_gtest.cmake
+++ b/cpp/cmake/thirdparty/get_gtest.cmake
@@ -1,5 +1,5 @@
# =============================================================================
-# Copyright (c) 2021, NVIDIA CORPORATION.
+# Copyright (c) 2021-2023, 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
@@ -30,7 +30,7 @@ function(find_and_configure_gtest)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(
- BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-testing-exports
+ BUILD GTest [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-testing-exports
)
endif()
diff --git a/cpp/cmake/thirdparty/get_kvikio.cmake b/cpp/cmake/thirdparty/get_kvikio.cmake
index e94e024d6c9..20712beec41 100644
--- a/cpp/cmake/thirdparty/get_kvikio.cmake
+++ b/cpp/cmake/thirdparty/get_kvikio.cmake
@@ -1,5 +1,5 @@
# =============================================================================
-# Copyright (c) 2022, NVIDIA CORPORATION.
+# Copyright (c) 2022-2023, 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
@@ -25,10 +25,12 @@ function(find_and_configure_kvikio VERSION)
OPTIONS "KvikIO_BUILD_EXAMPLES OFF"
)
- if(KvikIO_BINARY_DIR)
- include("${rapids-cmake-dir}/export/find_package_root.cmake")
- rapids_export_find_package_root(BUILD KvikIO "${KvikIO_BINARY_DIR}" cudf-exports)
- endif()
+ include("${rapids-cmake-dir}/export/find_package_root.cmake")
+ rapids_export_find_package_root(
+ BUILD KvikIO "${KvikIO_BINARY_DIR}"
+ EXPORT_SET cudf-exports
+ CONDITION KvikIO_BINARY_DIR
+ )
endfunction()
diff --git a/cpp/cmake/thirdparty/get_libcudacxx.cmake b/cpp/cmake/thirdparty/get_libcudacxx.cmake
index 0e03352c335..285d66287f3 100644
--- a/cpp/cmake/thirdparty/get_libcudacxx.cmake
+++ b/cpp/cmake/thirdparty/get_libcudacxx.cmake
@@ -22,16 +22,14 @@ function(find_and_configure_libcudacxx)
include(${rapids-cmake-dir}/cpm/libcudacxx.cmake)
rapids_cpm_libcudacxx(BUILD_EXPORT_SET cudf-exports INSTALL_EXPORT_SET cudf-exports)
- if(libcudacxx_SOURCE_DIR)
- # Store where CMake can find our custom Thrust install
- include("${rapids-cmake-dir}/export/find_package_root.cmake")
- rapids_export_find_package_root(
- INSTALL
- libcudacxx
- [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/libcudacxx]=]
- cudf-exports
- )
- endif()
+ # Store where CMake can find our custom Thrust install
+ include("${rapids-cmake-dir}/export/find_package_root.cmake")
+ rapids_export_find_package_root(
+ INSTALL libcudacxx
+ [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/libcudacxx]=]
+ EXPORT_SET cudf-exports
+ CONDITION libcudacxx_SOURCE_DIR
+ )
endfunction()
find_and_configure_libcudacxx()
diff --git a/cpp/cmake/thirdparty/get_nvbench.cmake b/cpp/cmake/thirdparty/get_nvbench.cmake
index f0642145fa0..bbd22693ba4 100644
--- a/cpp/cmake/thirdparty/get_nvbench.cmake
+++ b/cpp/cmake/thirdparty/get_nvbench.cmake
@@ -21,7 +21,7 @@ function(find_and_configure_nvbench)
set(cudf_patch_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/patches")
rapids_cpm_package_override("${cudf_patch_dir}/nvbench_override.json")
- rapids_cpm_nvbench()
+ rapids_cpm_nvbench(BUILD_STATIC)
endfunction()
diff --git a/cpp/cmake/thirdparty/get_spdlog.cmake b/cpp/cmake/thirdparty/get_spdlog.cmake
index fff5b84af0d..c0e07d02d94 100644
--- a/cpp/cmake/thirdparty/get_spdlog.cmake
+++ b/cpp/cmake/thirdparty/get_spdlog.cmake
@@ -27,7 +27,9 @@ function(find_and_configure_spdlog)
NAMESPACE spdlog::
)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
- rapids_export_find_package_root(BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] cudf-exports)
+ rapids_export_find_package_root(
+ BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports
+ )
endif()
endfunction()
diff --git a/cpp/cmake/thirdparty/get_thrust.cmake b/cpp/cmake/thirdparty/get_thrust.cmake
index 39a9de15fa6..67ed4287d7b 100644
--- a/cpp/cmake/thirdparty/get_thrust.cmake
+++ b/cpp/cmake/thirdparty/get_thrust.cmake
@@ -33,14 +33,13 @@ function(find_and_configure_thrust)
INSTALL_EXPORT_SET cudf-exports
)
- if(Thrust_SOURCE_DIR)
- # Store where CMake can find our custom Thrust install
- include("${rapids-cmake-dir}/export/find_package_root.cmake")
- rapids_export_find_package_root(
- INSTALL Thrust
- [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/thrust]=] cudf-exports
- )
- endif()
+ # Store where CMake can find our custom Thrust install
+ include("${rapids-cmake-dir}/export/find_package_root.cmake")
+ rapids_export_find_package_root(
+ INSTALL Thrust [=[${CMAKE_CURRENT_LIST_DIR}/../../../include/libcudf/lib/rapids/cmake/thrust]=]
+ EXPORT_SET cudf-exports
+ CONDITION Thrust_SOURCE_DIR
+ )
endfunction()
find_and_configure_thrust()
diff --git a/cpp/cmake/thirdparty/patches/nvbench_override.json b/cpp/cmake/thirdparty/patches/nvbench_override.json
index 7be868081b6..f85bdb9486c 100644
--- a/cpp/cmake/thirdparty/patches/nvbench_override.json
+++ b/cpp/cmake/thirdparty/patches/nvbench_override.json
@@ -9,8 +9,8 @@
"fixed_in" : ""
},
{
- "file" : "nvbench/use_existing_fmt.diff",
- "issue" : "Fix add support for using an existing fmt [https://github.com/NVIDIA/nvbench/pull/125]",
+ "file" : "nvbench/nvml_with_static_builds.diff",
+ "issue" : "Add support for nvml with static nvbench [https://github.com/NVIDIA/nvbench/pull/148]",
"fixed_in" : ""
}
]
diff --git a/cpp/doxygen/Doxyfile b/cpp/doxygen/Doxyfile
index b072d252881..adefaaa1479 100644
--- a/cpp/doxygen/Doxyfile
+++ b/cpp/doxygen/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = libcudf
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 23.10.00
+PROJECT_NUMBER = 23.12.00
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -2226,7 +2226,7 @@ SKIP_FUNCTION_MACROS = YES
# the path). If a tag file is not located in the directory in which doxygen is
# run, you must also specify the path to the tagfile here.
-TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.10
+TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/23.12
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
# tag file that is based on the input files it reads. See section "Linking to
diff --git a/cpp/examples/README.md b/cpp/examples/README.md
index b2e8dd399d0..7f2b769f4a5 100644
--- a/cpp/examples/README.md
+++ b/cpp/examples/README.md
@@ -7,3 +7,4 @@ Current examples:
- Basic: demonstrates a basic use case with libcudf and building a custom application with libcudf
- Strings: demonstrates using libcudf for accessing and creating strings columns and for building custom kernels for strings
+- Nested Types: demonstrates using libcudf for some operations on nested types
diff --git a/cpp/examples/basic/CMakeLists.txt b/cpp/examples/basic/CMakeLists.txt
index 1c1952c4616..759a43b5627 100644
--- a/cpp/examples/basic/CMakeLists.txt
+++ b/cpp/examples/basic/CMakeLists.txt
@@ -8,23 +8,7 @@ project(
LANGUAGES CXX CUDA
)
-set(CPM_DOWNLOAD_VERSION v0.35.3)
-file(
- DOWNLOAD
- https://github.com/cpm-cmake/CPM.cmake/releases/download/${CPM_DOWNLOAD_VERSION}/get_cpm.cmake
- ${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake
-)
-include(${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake)
-
-set(CUDF_TAG branch-23.10)
-CPMFindPackage(
- NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf
- GIT_TAG ${CUDF_TAG}
- GIT_SHALLOW
- TRUE
- SOURCE_SUBDIR
- cpp
-)
+include(../fetch_dependencies.cmake)
# Configure your project here
add_executable(basic_example src/process_csv.cpp)
diff --git a/cpp/examples/build.sh b/cpp/examples/build.sh
index 7d389cd318d..001cdeec694 100755
--- a/cpp/examples/build.sh
+++ b/cpp/examples/build.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2021-2022, NVIDIA CORPORATION.
+# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# libcudf examples build script
@@ -14,18 +14,17 @@ LIB_BUILD_DIR=${LIB_BUILD_DIR:-$(readlink -f "${EXAMPLES_DIR}/../build")}
################################################################################
# Add individual libcudf examples build scripts down below
-# Basic example
-BASIC_EXAMPLE_DIR=${EXAMPLES_DIR}/basic
-BASIC_EXAMPLE_BUILD_DIR=${BASIC_EXAMPLE_DIR}/build
-# Configure
-cmake -S ${BASIC_EXAMPLE_DIR} -B ${BASIC_EXAMPLE_BUILD_DIR} -Dcudf_ROOT="${LIB_BUILD_DIR}"
-# Build
-cmake --build ${BASIC_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL}
-
-# Strings example
-STRINGS_EXAMPLE_DIR=${EXAMPLES_DIR}/strings
-STRINGS_EXAMPLE_BUILD_DIR=${STRINGS_EXAMPLE_DIR}/build
-# Configure
-cmake -S ${STRINGS_EXAMPLE_DIR} -B ${STRINGS_EXAMPLE_BUILD_DIR} -Dcudf_ROOT="${LIB_BUILD_DIR}"
-# Build
-cmake --build ${STRINGS_EXAMPLE_BUILD_DIR} -j${PARALLEL_LEVEL}
+build_example() {
+ example_dir=${1}
+ example_dir="${EXAMPLES_DIR}/${example_dir}"
+ build_dir="${example_dir}/build"
+
+ # Configure
+ cmake -S ${example_dir} -B ${build_dir} -Dcudf_ROOT="${LIB_BUILD_DIR}"
+ # Build
+ cmake --build ${build_dir} -j${PARALLEL_LEVEL}
+}
+
+build_example basic
+build_example strings
+build_example nested_types
diff --git a/cpp/examples/fetch_dependencies.cmake b/cpp/examples/fetch_dependencies.cmake
new file mode 100644
index 00000000000..dc86c6a9aa5
--- /dev/null
+++ b/cpp/examples/fetch_dependencies.cmake
@@ -0,0 +1,30 @@
+# =============================================================================
+# Copyright (c) 2023, 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.
+# =============================================================================
+set(CPM_DOWNLOAD_VERSION v0.35.3)
+file(
+ DOWNLOAD
+ https://github.com/cpm-cmake/CPM.cmake/releases/download/${CPM_DOWNLOAD_VERSION}/get_cpm.cmake
+ ${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake
+)
+include(${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake)
+
+set(CUDF_TAG branch-23.12)
+CPMFindPackage(
+ NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf
+ GIT_TAG ${CUDF_TAG}
+ GIT_SHALLOW
+ TRUE
+ SOURCE_SUBDIR
+ cpp
+)
diff --git a/cpp/examples/nested_types/CMakeLists.txt b/cpp/examples/nested_types/CMakeLists.txt
new file mode 100644
index 00000000000..cb9430db237
--- /dev/null
+++ b/cpp/examples/nested_types/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Copyright (c) 2023, NVIDIA CORPORATION.
+
+cmake_minimum_required(VERSION 3.26.4)
+
+project(
+ nested_types
+ VERSION 0.0.1
+ LANGUAGES CXX CUDA
+)
+
+include(../fetch_dependencies.cmake)
+
+# Configure your project here
+add_executable(deduplication deduplication.cpp)
+target_link_libraries(deduplication PRIVATE cudf::cudf)
+target_compile_features(deduplication PRIVATE cxx_std_17)
diff --git a/cpp/examples/nested_types/deduplication.cpp b/cpp/examples/nested_types/deduplication.cpp
new file mode 100644
index 00000000000..5969985cc72
--- /dev/null
+++ b/cpp/examples/nested_types/deduplication.cpp
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2023, 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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+/**
+ * @file deduplication.cpp
+ * @brief Demonstrates usage of the libcudf APIs to perform operations on nested-type tables.
+ *
+ * The algorithms chosen to be demonstrated are to showcase nested-type row operators of three
+ * kinds:
+ * 1. hashing: Used by functions `count_aggregate` and `join_count` to hash inputs of any type
+ * 2. equality: Used by functions `count_aggregate` and `join_count` in conjunction with hashing
+ * to determine equality for nested types
+ * 3. lexicographic: Used by function `sort_keys` to create a lexicographical order for nested-types
+ * so as to enable sorting
+ *
+ */
+
+/**
+ * @brief Create memory resource for libcudf functions
+ *
+ * @param pool Whether to use a pool memory resource.
+ * @return Memory resource instance
+ */
+std::shared_ptr create_memory_resource(bool pool)
+{
+ auto cuda_mr = std::make_shared();
+ if (pool) { return rmm::mr::make_owning_wrapper(cuda_mr); }
+ return cuda_mr;
+}
+
+/**
+ * @brief Read JSON input from file
+ *
+ * @param filepath path to input JSON file
+ * @return cudf::io::table_with_metadata
+ */
+cudf::io::table_with_metadata read_json(std::string filepath)
+{
+ auto source_info = cudf::io::source_info(filepath);
+ auto builder = cudf::io::json_reader_options::builder(source_info).lines(true);
+ auto options = builder.build();
+ return cudf::io::read_json(options);
+}
+
+/**
+ * @brief Write JSON output to file
+ *
+ * @param input table to write
+ * @param metadata metadata of input table read by JSON reader
+ * @param filepath path to output JSON file
+ */
+void write_json(cudf::table_view input, cudf::io::table_metadata metadata, std::string filepath)
+{
+ // write the data for inspection
+ auto sink_info = cudf::io::sink_info(filepath);
+ auto builder = cudf::io::json_writer_options::builder(sink_info, input).lines(true);
+ builder.metadata(metadata);
+ auto options = builder.build();
+ cudf::io::write_json(options);
+}
+
+/**
+ * @brief Aggregate count of duplicate rows in nested-type column
+ *
+ * @param input table to aggregate
+ * @return std::unique_ptr
+ */
+std::unique_ptr count_aggregate(cudf::table_view input)
+{
+ // Get count for each key
+ auto keys = cudf::table_view{{input.column(0)}};
+ auto val = cudf::make_numeric_column(cudf::data_type{cudf::type_id::INT32}, keys.num_rows());
+
+ cudf::groupby::groupby grpby_obj(keys);
+ std::vector requests;
+ requests.emplace_back(cudf::groupby::aggregation_request());
+ auto agg = cudf::make_count_aggregation();
+ requests[0].aggregations.push_back(std::move(agg));
+ requests[0].values = *val;
+ auto agg_results = grpby_obj.aggregate(requests);
+ auto result_key = std::move(agg_results.first);
+ auto result_val = std::move(agg_results.second[0].results[0]);
+
+ auto left_cols = result_key->release();
+ left_cols.push_back(std::move(result_val));
+
+ return std::make_unique(std::move(left_cols));
+}
+
+/**
+ * @brief Join each row with its duplicate counts
+ *
+ * @param left left table
+ * @param right right table
+ * @return std::unique_ptr
+ */
+std::unique_ptr join_count(cudf::table_view left, cudf::table_view right)
+{
+ auto [left_indices, right_indices] =
+ cudf::inner_join(cudf::table_view{{left.column(0)}}, cudf::table_view{{right.column(0)}});
+ auto new_left = cudf::gather(left, cudf::device_span{*left_indices});
+ auto new_right = cudf::gather(right, cudf::device_span{*right_indices});
+
+ auto left_cols = new_left->release();
+ auto right_cols = new_right->release();
+ left_cols.push_back(std::move(right_cols[1]));
+
+ return std::make_unique(std::move(left_cols));
+}
+
+/**
+ * @brief Sort nested-type column
+ *
+ * @param input table to sort
+ * @return std::unique_ptr
+ *
+ * @note if stability is desired, use `cudf::stable_sorted_order`
+ */
+std::unique_ptr sort_keys(cudf::table_view input)
+{
+ auto sort_order = cudf::sorted_order(cudf::table_view{{input.column(0)}});
+ return cudf::gather(input, *sort_order);
+}
+
+/**
+ * @brief Main for nested_types examples
+ *
+ * Command line parameters:
+ * 1. JSON input file name/path (default: "example.json")
+ * 2. JSON output file name/path (default: "output.json")
+ * 3. Memory resource (optional): "pool" or "cuda" (default: "pool")
+ *
+ * Example invocation from directory `cudf/cpp/examples/nested_types`:
+ * ./build/deduplication example.json output.json pool
+ *
+ */
+int main(int argc, char const** argv)
+{
+ std::string input_filepath;
+ std::string output_filepath;
+ std::string mr_name;
+ if (argc != 4 && argc != 1) {
+ std::cout << "Either provide all command-line arguments, or none to use defaults" << std::endl;
+ return 1;
+ }
+ if (argc == 1) {
+ input_filepath = "example.json";
+ output_filepath = "output.json";
+ mr_name = "pool";
+ } else {
+ input_filepath = argv[1];
+ output_filepath = argv[2];
+ mr_name = argv[3];
+ }
+
+ auto pool = mr_name == "pool";
+ auto resource = create_memory_resource(pool);
+ rmm::mr::set_current_device_resource(resource.get());
+
+ std::cout << "Reading " << input_filepath << "..." << std::endl;
+ // read input file
+ auto [input, metadata] = read_json(input_filepath);
+
+ auto count = count_aggregate(input->view());
+
+ auto combined = join_count(input->view(), count->view());
+
+ auto sorted = sort_keys(combined->view());
+
+ metadata.schema_info.emplace_back("count");
+
+ std::cout << "Writing " << output_filepath << "..." << std::endl;
+ write_json(sorted->view(), metadata, output_filepath);
+
+ return 0;
+}
diff --git a/cpp/examples/nested_types/example.json b/cpp/examples/nested_types/example.json
new file mode 100644
index 00000000000..efaa37817d6
--- /dev/null
+++ b/cpp/examples/nested_types/example.json
@@ -0,0 +1,5 @@
+{"features": {"key": "a1", "values": [{"info": "message_1", "type": "device_a", "dt": 1688750001}]}, "source": "network_a", "quality": 0.7}
+{"features": {"key": "a2", "values": [{"info": "message_2", "type": "device_a", "dt": 1688750002}]}, "source": "network_a", "quality": 0.7}
+{"features": {"key": "a3", "values": [{"info": "message_3", "type": "device_a", "dt": 1688750003}]}, "source": "network_b", "quality": 0.8}
+{"features": {"key": "a1", "values": [{"info": "message_1", "type": "device_a", "dt": 1688750001}]}, "source": "network_b", "quality": 0.9}
+{"features": {"key": "a4", "values": [{"info": "message_4", "type": "device_a", "dt": 1688750004}]}, "source": "network_b", "quality": 0.9}
diff --git a/cpp/examples/strings/CMakeLists.txt b/cpp/examples/strings/CMakeLists.txt
index 31a6b12a4bc..c90fa9dde16 100644
--- a/cpp/examples/strings/CMakeLists.txt
+++ b/cpp/examples/strings/CMakeLists.txt
@@ -8,23 +8,7 @@ project(
LANGUAGES CXX CUDA
)
-set(CPM_DOWNLOAD_VERSION v0.35.3)
-file(
- DOWNLOAD
- https://github.com/cpm-cmake/CPM.cmake/releases/download/${CPM_DOWNLOAD_VERSION}/get_cpm.cmake
- ${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake
-)
-include(${CMAKE_BINARY_DIR}/cmake/get_cpm.cmake)
-
-set(CUDF_TAG branch-23.10)
-CPMFindPackage(
- NAME cudf GIT_REPOSITORY https://github.com/rapidsai/cudf
- GIT_TAG ${CUDF_TAG}
- GIT_SHALLOW
- TRUE
- SOURCE_SUBDIR
- cpp
-)
+include(../fetch_dependencies.cmake)
list(APPEND CUDF_CUDA_FLAGS --expt-extended-lambda --expt-relaxed-constexpr)
diff --git a/cpp/include/cudf/ast/detail/expression_parser.hpp b/cpp/include/cudf/ast/detail/expression_parser.hpp
index db0abe435b0..a36a831a7aa 100644
--- a/cpp/include/cudf/ast/detail/expression_parser.hpp
+++ b/cpp/include/cudf/ast/detail/expression_parser.hpp
@@ -67,8 +67,8 @@ struct alignas(8) device_data_reference {
bool operator==(device_data_reference const& rhs) const
{
- return std::tie(data_index, reference_type, table_source) ==
- std::tie(rhs.data_index, rhs.reference_type, rhs.table_source);
+ return std::tie(data_index, data_type, reference_type, table_source) ==
+ std::tie(rhs.data_index, rhs.data_type, rhs.reference_type, rhs.table_source);
}
};
diff --git a/cpp/include/cudf/binaryop.hpp b/cpp/include/cudf/binaryop.hpp
index 77d6a4d1e89..9df4b4eb00f 100644
--- a/cpp/include/cudf/binaryop.hpp
+++ b/cpp/include/cudf/binaryop.hpp
@@ -102,6 +102,7 @@ enum class binary_operator : int32_t {
* @param rhs The right operand column
* @param op The binary operator
* @param output_type The desired data type of the output column
+ * @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned column's device memory
* @return Output column of `output_type` type containing the result of
* the binary operation
@@ -115,6 +116,7 @@ std::unique_ptr binary_operation(
column_view const& rhs,
binary_operator op,
data_type output_type,
+ rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
/**
@@ -131,6 +133,7 @@ std::unique_ptr binary_operation(
* @param rhs The right operand scalar
* @param op The binary operator
* @param output_type The desired data type of the output column
+ * @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned column's device memory
* @return Output column of `output_type` type containing the result of
* the binary operation
@@ -144,6 +147,7 @@ std::unique_ptr binary_operation(
scalar const& rhs,
binary_operator op,
data_type output_type,
+ rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
/**
@@ -158,6 +162,7 @@ std::unique_ptr binary_operation(
* @param rhs The right operand column
* @param op The binary operator
* @param output_type The desired data type of the output column
+ * @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned column's device memory
* @return Output column of `output_type` type containing the result of
* the binary operation
@@ -172,6 +177,7 @@ std::unique_ptr binary_operation(
column_view const& rhs,
binary_operator op,
data_type output_type,
+ rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
/**
@@ -189,6 +195,7 @@ std::unique_ptr binary_operation(
* @param output_type The desired data type of the output column. It is assumed
* that output_type is compatible with the output data type
* of the function in the PTX code
+ * @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned column's device memory
* @return Output column of `output_type` type containing the result of
* the binary operation
@@ -201,6 +208,7 @@ std::unique_ptr binary_operation(
column_view const& rhs,
std::string const& ptx,
data_type output_type,
+ rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
/**
diff --git a/cpp/include/cudf/column/column_device_view.cuh b/cpp/include/cudf/column/column_device_view.cuh
index 35851a99822..b1ff0bbaea7 100644
--- a/cpp/include/cudf/column/column_device_view.cuh
+++ b/cpp/include/cudf/column/column_device_view.cuh
@@ -16,6 +16,7 @@
#pragma once
#include
+#include
#include
#include
#include
@@ -442,10 +443,11 @@ class alignas(16) column_device_view : public detail::column_device_view_base {
__device__ T element(size_type element_index) const noexcept
{
size_type index = element_index + offset(); // account for this view's _offset
- auto const* d_offsets = d_children[strings_column_view::offsets_column_index].data();
char const* d_strings = d_children[strings_column_view::chars_column_index].data();
- size_type offset = d_offsets[index];
- return string_view{d_strings + offset, d_offsets[index + 1] - offset};
+ auto const offsets = d_children[strings_column_view::offsets_column_index];
+ auto const itr = cudf::detail::input_offsetalator(offsets.head(), offsets.type());
+ auto const offset = itr[index];
+ return string_view{d_strings + offset, static_cast(itr[index + 1] - offset)};
}
private:
diff --git a/cpp/include/cudf/detail/gather.cuh b/cpp/include/cudf/detail/gather.cuh
index 955f9914632..c9975ef2199 100644
--- a/cpp/include/cudf/detail/gather.cuh
+++ b/cpp/include/cudf/detail/gather.cuh
@@ -673,14 +673,20 @@ std::unique_ptr gather(table_view const& source_table,
mr));
}
- auto const nullable = bounds_policy == out_of_bounds_policy::NULLIFY ||
- std::any_of(source_table.begin(), source_table.end(), [](auto const& col) {
- return col.nullable();
- });
- if (nullable) {
- auto const op = bounds_policy == out_of_bounds_policy::NULLIFY ? gather_bitmask_op::NULLIFY
- : gather_bitmask_op::DONT_CHECK;
- gather_bitmask(source_table, gather_map_begin, destination_columns, op, stream, mr);
+ auto needs_new_bitmask = bounds_policy == out_of_bounds_policy::NULLIFY ||
+ cudf::has_nested_nullable_columns(source_table);
+ if (needs_new_bitmask) {
+ needs_new_bitmask = needs_new_bitmask || cudf::has_nested_nulls(source_table);
+ if (needs_new_bitmask) {
+ auto const op = bounds_policy == out_of_bounds_policy::NULLIFY
+ ? gather_bitmask_op::NULLIFY
+ : gather_bitmask_op::DONT_CHECK;
+ gather_bitmask(source_table, gather_map_begin, destination_columns, op, stream, mr);
+ } else {
+ for (size_type i = 0; i < source_table.num_columns(); ++i) {
+ set_all_valid_null_masks(source_table.column(i), *destination_columns[i], stream, mr);
+ }
+ }
}
return std::make_unique(std::move(destination_columns));
diff --git a/cpp/include/cudf/detail/indexalator.cuh b/cpp/include/cudf/detail/indexalator.cuh
index 6532dae3695..4d261c54b29 100644
--- a/cpp/include/cudf/detail/indexalator.cuh
+++ b/cpp/include/cudf/detail/indexalator.cuh
@@ -56,10 +56,69 @@ namespace detail {
* auto result = thrust::find(thrust::device, begin, end, size_type{12} );
* @endcode
*/
-using input_indexalator = input_normalator;
+struct input_indexalator : base_normalator {
+ friend struct base_normalator; // for CRTP
+
+ using reference = cudf::size_type const; // this keeps STL and thrust happy
+
+ input_indexalator() = default;
+ input_indexalator(input_indexalator const&) = default;
+ input_indexalator(input_indexalator&&) = default;
+ input_indexalator& operator=(input_indexalator const&) = default;
+ input_indexalator& operator=(input_indexalator&&) = default;
+
+ /**
+ * @brief Indirection operator returns the value at the current iterator position
+ */
+ __device__ inline cudf::size_type operator*() const { return operator[](0); }
+
+ /**
+ * @brief Dispatch functor for resolving a Integer value from any integer type
+ */
+ struct normalize_type {
+ template ())>
+ __device__ cudf::size_type operator()(void const* tp)
+ {
+ return static_cast(*static_cast(tp));
+ }
+ template ())>
+ __device__ cudf::size_type operator()(void const*)
+ {
+ CUDF_UNREACHABLE("only integral types are supported");
+ }
+ };
+
+ /**
+ * @brief Array subscript operator returns a value at the input
+ * `idx` position as a `Integer` value.
+ */
+ __device__ inline cudf::size_type operator[](size_type idx) const
+ {
+ void const* tp = p_ + (idx * this->width_);
+ return type_dispatcher(this->dtype_, normalize_type{}, tp);
+ }
+
+ /**
+ * @brief Create an input index normalizing iterator
+ *
+ * Use the indexalator_factory to create an iterator instance.
+ *
+ * @param data Pointer to an integer array in device memory.
+ * @param dtype Type of data in data
+ * @param offset Applied to the data pointer per size of the type
+ */
+ CUDF_HOST_DEVICE input_indexalator(void const* data, data_type dtype, cudf::size_type offset = 0)
+ : base_normalator(dtype), p_{static_cast(data)}
+ {
+ p_ += offset * this->width_;
+ }
+
+ protected:
+ char const* p_; /// pointer to the integer data in device memory
+};
/**
- * @brief The index normalizing output iterator.
+ * @brief The index normalizing output iterator
*
* This is an iterator that can be used for index types (integers) without
* requiring a type-specific instance. It can be used for any iterator
@@ -82,7 +141,75 @@ using input_indexalator = input_normalator;
* thrust::less());
* @endcode
*/
-using output_indexalator = output_normalator;
+struct output_indexalator : base_normalator {
+ friend struct base_normalator; // for CRTP
+
+ using reference = output_indexalator const&; // required for output iterators
+
+ output_indexalator() = default;
+ output_indexalator(output_indexalator const&) = default;
+ output_indexalator(output_indexalator&&) = default;
+ output_indexalator& operator=(output_indexalator const&) = default;
+ output_indexalator& operator=(output_indexalator&&) = default;
+
+ /**
+ * @brief Indirection operator returns this iterator instance in order
+ * to capture the `operator=(Integer)` calls.
+ */
+ __device__ inline reference operator*() const { return *this; }
+
+ /**
+ * @brief Array subscript operator returns an iterator instance at the specified `idx` position.
+ *
+ * This allows capturing the subsequent `operator=(Integer)` call in this class.
+ */
+ __device__ inline output_indexalator const operator[](size_type idx) const
+ {
+ output_indexalator tmp{*this};
+ tmp.p_ += (idx * this->width_);
+ return tmp;
+ }
+
+ /**
+ * @brief Dispatch functor for setting the index value from a size_type value.
+ */
+ struct normalize_type {
+ template ())>
+ __device__ void operator()(void* tp, cudf::size_type const value)
+ {
+ (*static_cast(tp)) = static_cast(value);
+ }
+ template ())>
+ __device__ void operator()(void*, cudf::size_type const)
+ {
+ CUDF_UNREACHABLE("only index types are supported");
+ }
+ };
+
+ /**
+ * @brief Assign an Integer value to the current iterator position
+ */
+ __device__ inline reference operator=(cudf::size_type const value) const
+ {
+ void* tp = p_;
+ type_dispatcher(this->dtype_, normalize_type{}, tp, value);
+ return *this;
+ }
+
+ /**
+ * @brief Create an output normalizing iterator
+ *
+ * @param data Pointer to an integer array in device memory.
+ * @param dtype Type of data in data
+ */
+ CUDF_HOST_DEVICE output_indexalator(void* data, data_type dtype)
+ : base_normalator(dtype), p_{static_cast(data)}
+ {
+ }
+
+ protected:
+ char* p_; /// pointer to the integer data in device memory
+};
/**
* @brief Use this class to create an indexalator instance.
@@ -92,14 +219,12 @@ struct indexalator_factory {
* @brief A type_dispatcher functor to create an input iterator from an indices column.
*/
struct input_indexalator_fn {
- template ()>* = nullptr>
+ template ())>
input_indexalator operator()(column_view const& indices)
{
return input_indexalator(indices.data(), indices.type());
}
- template ()>* = nullptr>
+ template ())>
input_indexalator operator()(Args&&... args)
{
CUDF_FAIL("indices must be an index type");
@@ -110,16 +235,14 @@ struct indexalator_factory {
* @brief Use this class to create an indexalator to a scalar index.
*/
struct input_indexalator_scalar_fn {
- template ()>* = nullptr>
+ template ())>
input_indexalator operator()(scalar const& index)
{
// note: using static_cast const&>(index) creates a copy
auto const scalar_impl = static_cast const*>(&index);
return input_indexalator(scalar_impl->data(), index.type());
}
- template ()>* = nullptr>
+ template ())>
input_indexalator operator()(Args&&... args)
{
CUDF_FAIL("scalar must be an index type");
@@ -130,14 +253,12 @@ struct indexalator_factory {
* @brief A type_dispatcher functor to create an output iterator from an indices column.
*/
struct output_indexalator_fn {
- template ()>* = nullptr>
+ template ())>
output_indexalator operator()(mutable_column_view const& indices)
{
return output_indexalator(indices.data(), indices.type());
}
- template ()>* = nullptr>
+ template ())>
output_indexalator operator()(Args&&... args)
{
CUDF_FAIL("indices must be an index type");
diff --git a/cpp/include/cudf/detail/interop.hpp b/cpp/include/cudf/detail/interop.hpp
index 44024333239..8124471982d 100644
--- a/cpp/include/cudf/detail/interop.hpp
+++ b/cpp/include/cudf/detail/interop.hpp
@@ -194,5 +194,18 @@ std::unique_ptr from_arrow(arrow::Table const& input_table,
std::unique_ptr from_arrow(arrow::Scalar const& input,
rmm::cuda_stream_view stream,
rmm::mr::device_memory_resource* mr);
+
+/**
+ * @brief Return a maximum precision for a given type.
+ *
+ * @tparam T the type to get the maximum precision for
+ */
+template
+constexpr std::size_t max_precision()
+{
+ auto constexpr num_bits = sizeof(T) * 8;
+ return std::floor(num_bits * std::log(2) / std::log(10));
+}
+
} // namespace detail
} // namespace cudf
diff --git a/cpp/include/cudf/detail/merge.cuh b/cpp/include/cudf/detail/merge.cuh
deleted file mode 100644
index e8e9b080a92..00000000000
--- a/cpp/include/cudf/detail/merge.cuh
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright (c) 2018-2022, 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.
- */
-
-#pragma once
-
-#include
-#include
-
-#include
-#include
-#include
-
-namespace cudf {
-namespace detail {
-/**
- * @brief Source table identifier to copy data from.
- */
-enum class side : bool { LEFT, RIGHT };
-
-/**
- * @brief Tagged index type: `thrust::get<0>` indicates left/right side,
- * `thrust::get<1>` indicates the row index
- */
-using index_type = thrust::pair;
-
-/**
- * @brief Vector of `index_type` values.
- */
-using index_vector = rmm::device_uvector;
-
-/**
- * @brief tagged_element_relational_comparator uses element_relational_comparator to provide
- * "tagged-index" comparison logic.
- *
- * Special treatment is necessary in several thrust algorithms (e.g., merge()) where
- * the index affinity to the side is not guaranteed; i.e., the algorithms rely on
- * binary functors (predicates) where the operands may transparently switch sides.
- *
- * For example,
- * thrust::merge(left_container,
- * right_container,
- * predicate(lhs, rhs){...});
- * can create 4 different use-cases, inside predicate(...):
- *
- * 1. lhs refers to the left container; rhs to the right container;
- * 2. vice-versa;
- * 3. both lhs and rhs actually refer to the left container;
- * 4. both lhs and rhs actually refer to the right container;
- *
- * Because of that, one cannot rely on the predicate having *fixed* references to the containers.
- * Each invocation may land in a different situation (among the 4 above) than any other invocation.
- * Also, one cannot just manipulate lhs, rhs (indices) alone; because, if predicate always applies
- * one index to one container and the other index to the other container,
- * switching the indices alone won't suffice in the cases (3) or (4),
- * where the also the containers must be changed (to just one instead of two)
- * independently of indices;
- *
- * As a result, a special comparison logic is necessary whereby the index is "tagged" with side
- * information and consequently comparator functors (predicates) must operate on these tagged
- * indices rather than on raw indices.
- */
-template
-struct tagged_element_relational_comparator {
- __host__ __device__ tagged_element_relational_comparator(column_device_view lhs,
- column_device_view rhs,
- null_order null_precedence)
- : lhs{lhs}, rhs{rhs}, null_precedence{null_precedence}
- {
- }
-
- [[nodiscard]] __device__ weak_ordering compare(index_type lhs_tagged_index,
- index_type rhs_tagged_index) const noexcept
- {
- auto const [l_side, l_indx] = lhs_tagged_index;
- auto const [r_side, r_indx] = rhs_tagged_index;
-
- column_device_view const* ptr_left_dview{l_side == side::LEFT ? &lhs : &rhs};
- column_device_view const* ptr_right_dview{r_side == side::LEFT ? &lhs : &rhs};
-
- auto erl_comparator = element_relational_comparator(
- nullate::DYNAMIC{has_nulls}, *ptr_left_dview, *ptr_right_dview, null_precedence);
-
- return cudf::type_dispatcher(lhs.type(), erl_comparator, l_indx, r_indx);
- }
-
- private:
- column_device_view lhs;
- column_device_view rhs;
- null_order null_precedence;
-};
-
-/**
- * @brief The equivalent of `row_lexicographic_comparator` for tagged indices.
- */
-template
-struct row_lexicographic_tagged_comparator {
- row_lexicographic_tagged_comparator(table_device_view lhs,
- table_device_view rhs,
- order const* column_order = nullptr,
- null_order const* null_precedence = nullptr)
- : _lhs{lhs}, _rhs{rhs}, _column_order{column_order}, _null_precedence{null_precedence}
- {
- // Add check for types to be the same.
- CUDF_EXPECTS(_lhs.num_columns() == _rhs.num_columns(), "Mismatched number of columns.");
- }
-
- __device__ bool operator()(index_type lhs_tagged_index,
- index_type rhs_tagged_index) const noexcept
- {
- for (size_type i = 0; i < _lhs.num_columns(); ++i) {
- bool ascending = (_column_order == nullptr) or (_column_order[i] == order::ASCENDING);
-
- null_order null_precedence =
- _null_precedence == nullptr ? null_order::BEFORE : _null_precedence[i];
-
- auto comparator = tagged_element_relational_comparator{
- _lhs.column(i), _rhs.column(i), null_precedence};
-
- weak_ordering state = comparator.compare(lhs_tagged_index, rhs_tagged_index);
-
- if (state == weak_ordering::EQUIVALENT) { continue; }
-
- return state == (ascending ? weak_ordering::LESS : weak_ordering::GREATER);
- }
- return false;
- }
-
- private:
- table_device_view _lhs;
- table_device_view _rhs;
- null_order const* _null_precedence{};
- order const* _column_order{};
-};
-
-/**
- * @copydoc std::unique_ptr merge(
- * std::vector const& tables_to_merge,
- * std::vector const& key_cols,
- * std::vector const& column_order,
- * std::vector const& null_precedence,
- * rmm::mr::device_memory_resource* mr)
- *
- * @param stream CUDA stream used for device memory operations and kernel launches
- */
-std::unique_ptr merge(std::vector const& tables_to_merge,
- std::vector const& key_cols,
- std::vector const& column_order,
- std::vector const& null_precedence,
- rmm::cuda_stream_view stream,
- rmm::mr::device_memory_resource* mr);
-
-} // namespace detail
-} // namespace cudf
diff --git a/cpp/include/cudf/detail/merge.hpp b/cpp/include/cudf/detail/merge.hpp
new file mode 100644
index 00000000000..2167a484214
--- /dev/null
+++ b/cpp/include/cudf/detail/merge.hpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018-2023, 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.
+ */
+
+#pragma once
+
+#include
+
+#include
+
+namespace cudf {
+namespace detail {
+
+/**
+ * @brief Source table identifier to copy data from.
+ */
+enum class side : bool { LEFT, RIGHT };
+
+/**
+ * @brief Tagged index type: `thrust::get<0>` indicates left/right side,
+ * `thrust::get<1>` indicates the row index
+ */
+using index_type = thrust::pair;
+
+/**
+ * @brief Vector of `index_type` values.
+ */
+using index_vector = rmm::device_uvector;
+
+/**
+ * @copydoc std::unique_ptr merge(
+ * std::vector const& tables_to_merge,
+ * std::vector const& key_cols,
+ * std::vector const& column_order,
+ * std::vector const& null_precedence,
+ * rmm::mr::device_memory_resource* mr)
+ *
+ * @param stream CUDA stream used for device memory operations and kernel launches
+ */
+std::unique_ptr merge(std::vector const& tables_to_merge,
+ std::vector const& key_cols,
+ std::vector const& column_order,
+ std::vector const& null_precedence,
+ rmm::cuda_stream_view stream,
+ rmm::mr::device_memory_resource* mr);
+
+} // namespace detail
+} // namespace cudf
diff --git a/cpp/include/cudf/detail/normalizing_iterator.cuh b/cpp/include/cudf/detail/normalizing_iterator.cuh
index 51b3133f84f..8f90afc3e57 100644
--- a/cpp/include/cudf/detail/normalizing_iterator.cuh
+++ b/cpp/include/cudf/detail/normalizing_iterator.cuh
@@ -33,8 +33,8 @@ namespace detail {
* @tparam Integer The type the iterator normalizes to
*/
template
-struct base_normalator {
- static_assert(std::is_integral_v);
+struct alignas(16) base_normalator {
+ static_assert(cudf::is_index_type());
using difference_type = std::ptrdiff_t;
using value_type = Integer;
using pointer = Integer*;
@@ -202,165 +202,43 @@ struct base_normalator {
return static_cast(*this).p_ >= rhs.p_;
}
- protected:
- /**
- * @brief Constructor assigns width and type member variables for base class.
- */
- explicit base_normalator(data_type dtype) : width_(size_of(dtype)), dtype_(dtype) {}
-
- int width_; /// integer type width = 1,2,4, or 8
- data_type dtype_; /// for type-dispatcher calls
-};
-
-/**
- * @brief The integer normalizing input iterator
- *
- * This is an iterator that can be used for index types (integers) without
- * requiring a type-specific instance. It can be used for any iterator
- * interface for reading an array of integer values of type
- * int8, int16, int32, int64, uint8, uint16, uint32, or uint64.
- * Reading specific elements always return a type of `Integer`
- *
- * @tparam Integer Type returned by all read functions
- */
-template
-struct input_normalator : base_normalator, Integer> {
- friend struct base_normalator, Integer>; // for CRTP
-
- using reference = Integer const; // this keeps STL and thrust happy
-
- input_normalator() = default;
- input_normalator(input_normalator const&) = default;
- input_normalator(input_normalator&&) = default;
- input_normalator& operator=(input_normalator const&) = default;
- input_normalator& operator=(input_normalator&&) = default;
-
- /**
- * @brief Indirection operator returns the value at the current iterator position
- */
- __device__ inline Integer operator*() const { return operator[](0); }
-
- /**
- * @brief Dispatch functor for resolving a Integer value from any integer type
- */
- struct normalize_type {
- template >* = nullptr>
- __device__ Integer operator()(void const* tp)
- {
- return static_cast(*static_cast(tp));
- }
- template >* = nullptr>
- __device__ Integer operator()(void const*)
+ private:
+ struct integer_sizeof_fn {
+ template ())>
+ CUDF_HOST_DEVICE constexpr std::size_t operator()() const
{
+#ifndef __CUDA_ARCH__
+ CUDF_FAIL("only integral types are supported");
+#else
CUDF_UNREACHABLE("only integral types are supported");
+#endif
}
- };
-
- /**
- * @brief Array subscript operator returns a value at the input
- * `idx` position as a `Integer` value.
- */
- __device__ inline Integer operator[](size_type idx) const
- {
- void const* tp = p_ + (idx * this->width_);
- return type_dispatcher(this->dtype_, normalize_type{}, tp);
- }
-
- /**
- * @brief Create an input index normalizing iterator.
- *
- * Use the indexalator_factory to create an iterator instance.
- *
- * @param data Pointer to an integer array in device memory.
- * @param data_type Type of data in data
- */
- input_normalator(void const* data, data_type dtype)
- : base_normalator, Integer>(dtype), p_{static_cast(data)}
- {
- }
-
- char const* p_; /// pointer to the integer data in device memory
-};
-
-/**
- * @brief The integer normalizing output iterator
- *
- * This is an iterator that can be used for index types (integers) without
- * requiring a type-specific instance. It can be used for any iterator
- * interface for writing an array of integer values of type
- * int8, int16, int32, int64, uint8, uint16, uint32, or uint64.
- * Setting specific elements always accept the `Integer` type values.
- *
- * @tparam Integer The type used for all write functions
- */
-template
-struct output_normalator : base_normalator, Integer> {
- friend struct base_normalator, Integer>; // for CRTP
-
- using reference = output_normalator const&; // required for output iterators
-
- output_normalator() = default;
- output_normalator(output_normalator const&) = default;
- output_normalator(output_normalator&&) = default;
- output_normalator& operator=(output_normalator const&) = default;
- output_normalator& operator=(output_normalator&&) = default;
-
- /**
- * @brief Indirection operator returns this iterator instance in order
- * to capture the `operator=(Integer)` calls.
- */
- __device__ inline output_normalator const& operator*() const { return *this; }
-
- /**
- * @brief Array subscript operator returns an iterator instance at the specified `idx` position.
- *
- * This allows capturing the subsequent `operator=(Integer)` call in this class.
- */
- __device__ inline output_normalator const operator[](size_type idx) const
- {
- output_normalator tmp{*this};
- tmp.p_ += (idx * this->width_);
- return tmp;
- }
-
- /**
- * @brief Dispatch functor for setting the index value from a size_type value.
- */
- struct normalize_type {
- template >* = nullptr>
- __device__ void operator()(void* tp, Integer const value)
- {
- (*static_cast(tp)) = static_cast(value);
- }
- template >* = nullptr>
- __device__ void operator()(void*, Integer const)
+ template ())>
+ CUDF_HOST_DEVICE constexpr std::size_t operator()() const noexcept
{
- CUDF_UNREACHABLE("only index types are supported");
+ return sizeof(T);
}
};
+ protected:
/**
- * @brief Assign an Integer value to the current iterator position
+ * @brief Constructor assigns width and type member variables for base class.
*/
- __device__ inline output_normalator const& operator=(Integer const value) const
+ explicit CUDF_HOST_DEVICE base_normalator(data_type dtype) : dtype_(dtype)
{
- void* tp = p_;
- type_dispatcher(this->dtype_, normalize_type{}, tp, value);
- return *this;
+ width_ = static_cast(type_dispatcher(dtype, integer_sizeof_fn{}));
}
/**
- * @brief Create an output normalizing iterator
- *
- * @param data Pointer to an integer array in device memory.
- * @param data_type Type of data in data
+ * @brief Constructor assigns width and type member variables for base class.
*/
- output_normalator(void* data, data_type dtype)
- : base_normalator, Integer>(dtype), p_{static_cast(data)}
+ explicit CUDF_HOST_DEVICE base_normalator(data_type dtype, int32_t width)
+ : width_(width), dtype_(dtype)
{
}
- char* p_; /// pointer to the integer data in device memory
+ int32_t width_; /// integer type width = 1,2,4, or 8
+ data_type dtype_; /// for type-dispatcher calls
};
} // namespace detail
diff --git a/cpp/include/cudf/detail/null_mask.hpp b/cpp/include/cudf/detail/null_mask.hpp
index 8c10bbe416f..74e2ccd2ea1 100644
--- a/cpp/include/cudf/detail/null_mask.hpp
+++ b/cpp/include/cudf/detail/null_mask.hpp
@@ -15,6 +15,7 @@
*/
#pragma once
+#include
#include
#include
#include
@@ -259,6 +260,22 @@ cudf::size_type inplace_bitmask_and(device_span dest_mask,
size_type mask_size_bits,
rmm::cuda_stream_view stream);
+/**
+ * @brief Recursively set valid null masks for all children.
+ *
+ * This function applies all valid null masks to the output column if input column satisfies
+ * `nullable() == true` condition
+ *
+ * @param input input column to check for nullability
+ * @param output output column to mirror nullability of input
+ * @param stream CUDA stream used for device memory operations and kernel launches
+ * @param mr Device memory resource used to allocate the returned column's device memory
+ */
+void set_all_valid_null_masks(column_view const& input,
+ column& output,
+ rmm::cuda_stream_view stream,
+ rmm::mr::device_memory_resource* mr);
+
} // namespace detail
} // namespace cudf
diff --git a/cpp/include/cudf/detail/offsets_iterator.cuh b/cpp/include/cudf/detail/offsets_iterator.cuh
new file mode 100644
index 00000000000..3eb77b32353
--- /dev/null
+++ b/cpp/include/cudf/detail/offsets_iterator.cuh
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2023, 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.
+ */
+
+#pragma once
+
+#include
+#include
+
+namespace cudf {
+namespace detail {
+
+/**
+ * @brief The offsets normalizing input iterator
+ *
+ * This is an iterator that can be used for offsets where the underlying
+ * type may be int32_t or int64_t.
+ *
+ * Use the offsetalator_factory to create an appropriate input iterator
+ * from an offsets column_view.
+ */
+struct input_offsetalator : base_normalator {
+ friend struct base_normalator; // for CRTP
+
+ using reference = int64_t const; // this keeps STL and thrust happy
+
+ input_offsetalator() = default;
+ input_offsetalator(input_offsetalator const&) = default;
+ input_offsetalator(input_offsetalator&&) = default;
+ input_offsetalator& operator=(input_offsetalator const&) = default;
+ input_offsetalator& operator=(input_offsetalator&&) = default;
+
+ /**
+ * @brief Indirection operator returns the value at the current iterator position
+ */
+ __device__ inline int64_t operator*() const { return operator[](0); }
+
+ /**
+ * @brief Array subscript operator returns a value at the input
+ * `idx` position as a int64_t value.
+ */
+ __device__ inline int64_t operator[](size_type idx) const
+ {
+ void const* tp = p_ + (idx * this->width_);
+ return this->width_ == sizeof(int32_t) ? static_cast(*static_cast(tp))
+ : *static_cast(tp);
+ }
+
+ /**
+ * @brief Create an input index normalizing iterator.
+ *
+ * Use the indexalator_factory to create an iterator instance.
+ *
+ * @param data Pointer to an integer array in device memory.
+ * @param dtype Type of data in data
+ */
+ CUDF_HOST_DEVICE input_offsetalator(void const* data, data_type dtype)
+ : base_normalator(
+ dtype, dtype.id() == type_id::INT32 ? sizeof(int32_t) : sizeof(int64_t)),
+ p_{static_cast(data)}
+ {
+#ifndef __CUDA_ARCH__
+ CUDF_EXPECTS(dtype.id() == type_id::INT32 || dtype.id() == type_id::INT64,
+ "Unexpected offsets type");
+#else
+ cudf_assert((dtype.id() == type_id::INT32 || dtype.id() == type_id::INT64) &&
+ "Unexpected offsets type");
+#endif
+ }
+
+ protected:
+ char const* p_; /// pointer to the integer data in device memory
+};
+
+/**
+ * @brief The offsets normalizing output iterator
+ *
+ * This is an iterator that can be used for storing offsets values
+ * where the underlying type may be either int32_t or int64_t.
+ *
+ * Use the offsetalator_factory to create an appropriate output iterator
+ * from a mutable_column_view.
+ *
+ */
+struct output_offsetalator : base_normalator {
+ friend struct base_normalator; // for CRTP
+
+ using reference = output_offsetalator const&; // required for output iterators
+
+ output_offsetalator() = default;
+ output_offsetalator(output_offsetalator const&) = default;
+ output_offsetalator(output_offsetalator&&) = default;
+ output_offsetalator& operator=(output_offsetalator const&) = default;
+ output_offsetalator& operator=(output_offsetalator&&) = default;
+
+ /**
+ * @brief Indirection operator returns this iterator instance in order
+ * to capture the `operator=(int64)` calls.
+ */
+ __device__ inline output_offsetalator const& operator*() const { return *this; }
+
+ /**
+ * @brief Array subscript operator returns an iterator instance at the specified `idx` position.
+ *
+ * This allows capturing the subsequent `operator=(int64)` call in this class.
+ */
+ __device__ inline output_offsetalator const operator[](size_type idx) const
+ {
+ output_offsetalator tmp{*this};
+ tmp.p_ += (idx * this->width_);
+ return tmp;
+ }
+
+ /**
+ * @brief Assign an offset value to the current iterator position
+ */
+ __device__ inline output_offsetalator const& operator=(int64_t const value) const
+ {
+ void* tp = p_;
+ if (this->width_ == sizeof(int32_t)) {
+ (*static_cast(tp)) = static_cast(value);
+ } else {
+ (*static_cast(tp)) = value;
+ }
+ return *this;
+ }
+
+ /**
+ * @brief Create an output offsets iterator
+ *
+ * @param data Pointer to an integer array in device memory.
+ * @param dtype Type of data in data
+ */
+ CUDF_HOST_DEVICE output_offsetalator(void* data, data_type dtype)
+ : base_normalator(
+ dtype, dtype.id() == type_id::INT32 ? sizeof(int32_t) : sizeof(int64_t)),
+ p_{static_cast(data)}
+ {
+#ifndef __CUDA_ARCH__
+ CUDF_EXPECTS(dtype.id() == type_id::INT32 || dtype.id() == type_id::INT64,
+ "Unexpected offsets type");
+#else
+ cudf_assert((dtype.id() == type_id::INT32 || dtype.id() == type_id::INT64) &&
+ "Unexpected offsets type");
+#endif
+ }
+
+ protected:
+ char* p_; /// pointer to the integer data in device memory
+};
+
+} // namespace detail
+} // namespace cudf
diff --git a/cpp/include/cudf/detail/offsets_iterator_factory.cuh b/cpp/include/cudf/detail/offsets_iterator_factory.cuh
new file mode 100644
index 00000000000..5b4c6b825d2
--- /dev/null
+++ b/cpp/include/cudf/detail/offsets_iterator_factory.cuh
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2023, 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.
+ */
+
+#pragma once
+
+#include
+#include
+
+namespace cudf {
+namespace detail {
+
+/**
+ * @brief Use this class to create an offsetalator instance.
+ */
+struct offsetalator_factory {
+ /**
+ * @brief Create an input offsetalator instance from an offsets column
+ */
+ static input_offsetalator make_input_iterator(column_view const& offsets)
+ {
+ return input_offsetalator(offsets.head(), offsets.type());
+ }
+
+ /**
+ * @brief Create an output offsetalator instance from an offsets column
+ */
+ static output_offsetalator make_output_iterator(mutable_column_view const& offsets)
+ {
+ return output_offsetalator(offsets.head(), offsets.type());
+ }
+};
+
+} // namespace detail
+} // namespace cudf
diff --git a/cpp/include/cudf/detail/unary.hpp b/cpp/include/cudf/detail/unary.hpp
index 3fbdf4a5a8f..12f864de572 100644
--- a/cpp/include/cudf/detail/unary.hpp
+++ b/cpp/include/cudf/detail/unary.hpp
@@ -64,8 +64,6 @@ std::unique_ptr true_if(InputIterator begin,
/**
* @copydoc cudf::unary_operation
- *
- * @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr unary_operation(cudf::column_view const& input,
cudf::unary_operator op,
@@ -74,8 +72,6 @@ std::unique_ptr unary_operation(cudf::column_view const& input,
/**
* @copydoc cudf::is_valid
- *
- * @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr is_valid(cudf::column_view const& input,
rmm::cuda_stream_view stream,
@@ -83,8 +79,6 @@ std::unique_ptr is_valid(cudf::column_view const& input,
/**
* @copydoc cudf::cast
- *
- * @param stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr cast(column_view const& input,
data_type type,
@@ -93,8 +87,6 @@ std::unique_ptr cast(column_view const& input,
/**
* @copydoc cudf::is_nan
- *
- * @param[in] stream CUDA stream used for device memory operations and kernel launches.
*/
std::unique_ptr