-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Python/Cython bindings for libcudf_streaming #22760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
688f83a
feat(cudf_streaming): add Cython/Python package scaffolding
vyasr b3d08e7
feat(cudf_streaming): add integrations/ Cython bindings
vyasr 4bb32e5
feat(cudf_streaming): add streaming/ Cython bindings
vyasr 006a715
feat(cudf_streaming): add Python tests
vyasr e7cb26f
feat(cudf_streaming): add packaging
vyasr b8379bb
fix(cudf_streaming): add README.md for twine validation
vyasr 6503730
feat(cudf_streaming): add wheel and conda test jobs
vyasr 748cb08
fix(cudf_streaming): fix test import path and fixture resolution
vyasr 2a9be05
fix(cudf_streaming): add MPI support for conda tests
vyasr 5b66b8d
fix(cudf_streaming): build conda package in CI and fix conftest import
vyasr 9cffff7
fix(cudf_streaming): add build.sh target and fix wheel artifact resol…
vyasr 7a01161
Set wheel upload name correctly
vyasr 2ddc2a8
Remove incorrect importlib setting
vyasr 74811d3
fix(cudf_streaming): inline test fixtures from rapidsmpf
vyasr 19a6e9b
fix(cudf_streaming): use hyphenated conda package name for libcudf-st…
vyasr e3adb1d
fix(cudf_streaming): address review feedback
vyasr 80d31c8
fix(cudf_streaming): address reviewer feedback
vyasr 4efd65d
Make version a symlink
vyasr 32ca167
Address review: remove pxd docstring, add coroutine bridging comment
vyasr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source rapids-init-pip | ||
|
|
||
| package_name="cudf-streaming" | ||
| package_dir="python/cudf_streaming" | ||
| dependency_file_key_suffix="cudf_streaming" | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" | ||
|
|
||
| # Downloads libcudf_streaming wheel from this current build, | ||
| # then ensures 'cudf_streaming' wheel builds always use the 'libcudf_streaming' just built in the same CI run. | ||
| LIBCUDF_STREAMING_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcudf_streaming_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) | ||
| echo "libcudf-streaming-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUDF_STREAMING_WHEELHOUSE}/libcudf_streaming_*.whl)" >> "${PIP_CONSTRAINT}" | ||
|
vyasr marked this conversation as resolved.
|
||
|
|
||
| rapids-logger "Generating build requirements" | ||
|
|
||
| rapids-dependency-file-generator \ | ||
| --output requirements \ | ||
| --file-key "py_build_${dependency_file_key_suffix}" \ | ||
| --file-key "py_rapids_build_${dependency_file_key_suffix}" \ | ||
| --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true" \ | ||
| | tee /tmp/requirements-build.txt | ||
|
|
||
| rapids-logger "Installing build requirements" | ||
| rapids-pip-retry install \ | ||
| -v \ | ||
| --prefer-binary \ | ||
| -r /tmp/requirements-build.txt | ||
|
|
||
| # build with '--no-build-isolation', for better sccache hit rate | ||
| # 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735) | ||
| export PIP_NO_BUILD_ISOLATION=0 | ||
|
|
||
| # TODO: move this variable into `ci-wheel` | ||
| # Format Python limited API version string | ||
| RAPIDS_PY_API="cp${RAPIDS_PY_VERSION//./}" | ||
| export RAPIDS_PY_API | ||
|
|
||
| ./ci/build_wheel.sh "${package_name}" "${package_dir}" --stable | ||
|
|
||
| # repair wheels and write to the location that artifact-uploading code expects to find them | ||
| python -m auditwheel repair \ | ||
| --exclude libcudf.so \ | ||
| --exclude libcudf_streaming.so \ | ||
| --exclude librapidsmpf.so \ | ||
| --exclude librapids_logger.so \ | ||
| --exclude librmm.so \ | ||
| --exclude libucxx.so \ | ||
| --exclude libucp.so.0 \ | ||
| -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" \ | ||
| ${package_dir}/dist/* | ||
|
|
||
| ./ci/validate_wheel.sh "${package_dir}" "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" | ||
|
|
||
| RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cudf_streaming --stable --cuda)" | ||
| export RAPIDS_PACKAGE_NAME | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Support invoking run_cudf_streaming_pytests.sh outside the script directory | ||
| cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cudf_streaming/cudf_streaming/tests | ||
|
|
||
| # OpenMPI specific options (CI runs as root) | ||
| export OMPI_ALLOW_RUN_AS_ROOT=1 | ||
| export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 | ||
| export OMPI_MCA_opal_cuda_support=1 | ||
|
|
||
| # cudf_streaming tests require MPI for the communicator fixtures. | ||
| # Run with mpirun; currently single-rank only tests exist. | ||
| mpirun --map-by node --bind-to none -np 1 \ | ||
| python -m pytest --cache-clear "$@" . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source rapids-init-pip | ||
|
|
||
| RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" | ||
|
|
||
| # Download cudf_streaming, libcudf_streaming, and pylibcudf built in previous steps | ||
| CUDF_STREAMING_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" cudf_streaming --stable --cuda "$RAPIDS_CUDA_VERSION")") | ||
| LIBCUDF_STREAMING_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcudf_streaming_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) | ||
| LIBCUDF_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp) | ||
| PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" pylibcudf --stable --cuda "$RAPIDS_CUDA_VERSION")") | ||
|
|
||
| # generate constraints (possibly pinning to oldest support versions of dependencies) | ||
| rapids-generate-pip-constraints py_test_cudf_streaming "${PIP_CONSTRAINT}" | ||
|
|
||
| rapids-logger "Install cudf_streaming and its dependencies" | ||
|
|
||
| rapids-pip-retry install \ | ||
| -v \ | ||
| --prefer-binary \ | ||
| --constraint "${PIP_CONSTRAINT}" \ | ||
| "$(echo "${CUDF_STREAMING_WHEELHOUSE}"/cudf_streaming_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" \ | ||
| "$(echo "${LIBCUDF_STREAMING_WHEELHOUSE}"/libcudf_streaming_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ | ||
| "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ | ||
| "$(echo "${PYLIBCUDF_WHEELHOUSE}"/pylibcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" | ||
|
|
||
| rapids-logger "pytest cudf_streaming" | ||
| pushd python/cudf_streaming/cudf_streaming/tests | ||
| EXITCODE=0 | ||
| timeout 30m python -m pytest \ | ||
| --cache-clear \ | ||
|
vyasr marked this conversation as resolved.
|
||
| --numprocesses=8 \ | ||
| --dist=worksteal \ | ||
| . || EXITCODE=$? | ||
|
|
||
| # Exit code 5 means no tests were collected (all skipped); acceptable when | ||
| # communicator support (MPI/UCXX) is unavailable in the wheel test environment. | ||
| if [ ${EXITCODE} -ne 0 ] && [ ${EXITCODE} -ne 5 ]; then | ||
| exit ${EXITCODE} | ||
| fi | ||
| popd | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| c_compiler_version: | ||
| - 14 | ||
|
|
||
| cxx_compiler_version: | ||
| - 14 | ||
|
|
||
| c_stdlib: | ||
| - sysroot | ||
|
|
||
| c_stdlib_version: | ||
| - "2.28" | ||
|
|
||
| cmake_version: | ||
| - ">=4.0" | ||
|
|
||
| cuda_compiler: | ||
| - cuda-nvcc |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.