Skip to content
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

Support CUDA 12.0 for pip wheels #13289

Merged
merged 21 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run_script: "ci/build_docs.sh"
wheel-build-cudf:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@cuda-120-pip
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -78,7 +78,7 @@ jobs:
wheel-publish-cudf:
needs: wheel-build-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@cuda-120-pip
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -88,7 +88,7 @@ jobs:
wheel-build-dask-cudf:
needs: wheel-publish-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@cuda-120-pip
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -99,7 +99,7 @@ jobs:
wheel-publish-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-publish.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-publish.yml@cuda-120-pip
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
wheel-build-cudf:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@cuda-120-pip
with:
build_type: pull-request
package-name: cudf
Expand All @@ -107,30 +107,28 @@ jobs:
wheel-tests-cudf:
needs: wheel-build-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@cuda-120-pip
with:
build_type: pull-request
package-name: cudf
# Install cupy-cuda11x for arm from a special index url
test-before-arm64: "python -m pip install 'cupy-cuda11x>=12.0.0' -f https://pip.cupy.dev/aarch64"
test-unittest: "python -m pytest -n 8 ./python/cudf/cudf/tests"
test-smoketest: "python ./ci/wheel_smoke_test_cudf.py"
wheel-build-dask-cudf:
needs: wheel-tests-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@cuda-120-pip
with:
build_type: pull-request
package-name: dask_cudf
package-dir: python/dask_cudf
before-wheel: "RAPIDS_PY_WHEEL_NAME=cudf_cu11 rapids-download-wheels-from-s3 ./local-cudf && python -m pip install --no-deps ./local-cudf/cudf*.whl"
before-wheel: "RAPIDS_PY_WHEEL_NAME=cudf_${{ '${PIP_CU_VERSION}' }} rapids-download-wheels-from-s3 ./local-cudf && python -m pip install --no-deps ./local-cudf/cudf*.whl"
wheel-tests-dask-cudf:
needs: wheel-build-dask-cudf
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@cuda-120-pip
with:
build_type: pull-request
package-name: dask_cudf
# Install the cudf we just built, and also test against latest dask/distributed/dask-cuda.
test-before: "RAPIDS_PY_WHEEL_NAME=cudf_cu11 rapids-download-wheels-from-s3 ./local-cudf-dep && python -m pip install --no-deps ./local-cudf-dep/cudf*.whl && pip install git+https://github.com/dask/[email protected] git+https://github.com/dask/[email protected] git+https://github.com/rapidsai/[email protected]"
test-before: "RAPIDS_PY_WHEEL_NAME=cudf_${{ '${PIP_CU_VERSION}' }} rapids-download-wheels-from-s3 ./local-cudf-dep && python -m pip install --no-deps ./local-cudf-dep/cudf*.whl && pip install git+https://github.com/dask/[email protected] git+https://github.com/dask/[email protected] git+https://github.com/rapidsai/[email protected]"
vyasr marked this conversation as resolved.
Show resolved Hide resolved
test-unittest: "python -m pytest -n 8 ./python/dask_cudf/dask_cudf/tests"
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,17 @@ jobs:
run_script: "ci/test_notebooks.sh"
wheel-tests-cudf:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@cuda-120-pip
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
package-name: cudf
test-before-arm64: "python -m pip install 'cupy-cuda11x>=12.0.0' -f https://pip.cupy.dev/aarch64"
test-unittest: "python -m pytest -n 8 ./python/cudf/cudf/tests"
wheel-tests-dask-cudf:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@manylinux_v2
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@cuda-120-pip
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
8 changes: 8 additions & 0 deletions ci/release/apply_wheel_modifications.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ sed -i "s/cubinlinker/cubinlinker${CUDA_SUFFIX}/g" python/cudf/pyproject.toml
sed -i "s/^name = \"dask_cudf\"/name = \"dask_cudf${CUDA_SUFFIX}\"/g" python/dask_cudf/pyproject.toml
# Need to provide the == to avoid modifying the URL
sed -i "s/\"cudf==/\"cudf${CUDA_SUFFIX}==/g" python/dask_cudf/pyproject.toml

if [[ $CUDA_SUFFIX == "-cu12" ]]; then
sed -i "s/cuda-python[<=>\.,0-9]*/cuda-python>=12.0,<13.0/g" python/cudf/pyproject.toml
sed -i "s/cupy-cuda11x/cupy-cuda12x/g" python/{cudf,dask_cudf}/pyproject.toml
sed -i "s/numba[<=>\.,0-9]*/numba>=0.57/g" python/{cudf,dask_cudf}/pyproject.toml
sed -i "/ptxcompiler/d" python/cudf/pyproject.toml
sed -i "/cubinlinker/d" python/cudf/pyproject.toml
fi
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies:
- ninja
- notebook
- numba>=0.56.4,<0.57
- numpy>=1.21
- numpy>=1.21,<1.24
- numpydoc
- nvcc_linux-64=11.8
- nvtx>=0.2.1
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ requirements:
- pandas >=1.3,<1.6.0dev0
- cupy >=12.0.0
- numba >=0.56.4,<0.57
- numpy >=1.21
- numpy>=1.21,<1.24 # Temporarily upper bound numpy to avoid overflow deprecations
vyasr marked this conversation as resolved.
Show resolved Hide resolved
- {{ pin_compatible('pyarrow', max_pin='x.x.x') }}
- libcudf {{ version }}
- fastavro >=0.22.0
Expand Down
5 changes: 3 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ dependencies:
# Hard pin the patch version used during the build. This must be kept
# in sync with the version pinned in get_arrow.cmake.
- pyarrow==11.0.0.*
- numpy>=1.21
- numpy>=1.21,<1.24 # Temporarily upper bound numpy to avoid overflow deprecations
build_python:
common:
- output_types: [conda, requirements, pyproject]
Expand Down Expand Up @@ -341,7 +341,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- fsspec>=0.6.0
- numpy>=1.21
- numpy>=1.21,<1.24 # Temporarily upper bound numpy to avoid overflow deprecations
- pandas>=1.3,<1.6.0dev0
run_cudf:
common:
Expand Down Expand Up @@ -395,6 +395,7 @@ dependencies:
- distributed==2023.3.2.1
- output_types: conda
packages:
- cupy>=12.0.0
wence- marked this conversation as resolved.
Show resolved Hide resolved
- dask-core==2023.3.2 # dask-core in conda is the actual package & dask is the meta package
- output_types: pyproject
packages:
Expand Down
12 changes: 8 additions & 4 deletions python/cudf/cudf/core/udf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import cupy as cp
import llvmlite.binding as ll
import numpy as np
from cubinlinker.patch import _numba_version_ok, get_logger, new_patched_linker
from cuda import cudart
from numba import cuda, typeof
from numba.core.datamodel import default_manager, models
Expand Down Expand Up @@ -51,9 +50,6 @@
_cudf_str_dtype = dtype(str)


logger = get_logger()


JIT_SUPPORTED_TYPES = (
NUMERIC_TYPES
| BOOL_TYPES
Expand Down Expand Up @@ -460,9 +456,17 @@ def _setup_numba_linker(path):
def maybe_patch_numba_linker(
driver_version, runtime_version, ptx_toolkit_version
):
from cubinlinker.patch import (
_numba_version_ok,
get_logger,
new_patched_linker,
)

# Numba thinks cubinlinker is only needed if the driver is older than
# the ctk, but when PTX files are present, it might also need to patch
# because those PTX files may newer than the driver as well
logger = get_logger()

if (driver_version < ptx_toolkit_version) or (
driver_version < runtime_version
):
Expand Down
4 changes: 2 additions & 2 deletions python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
"cmake>=3.23.1,!=3.25.0",
"cython>=0.29,<0.30",
"ninja",
"numpy>=1.21",
"numpy>=1.21,<1.24",
"protoc-wheel",
"pyarrow==11.0.0.*",
"rmm==23.6.*",
Expand All @@ -32,7 +32,7 @@ dependencies = [
"cupy-cuda11x>=12.0.0",
"fsspec>=0.6.0",
"numba>=0.56.4,<0.57",
"numpy>=1.21",
"numpy>=1.21,<1.24",
"nvtx>=0.2.1",
"packaging",
"pandas>=1.3,<1.6.0dev0",
Expand Down
2 changes: 1 addition & 1 deletion python/cudf_kafka/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

requires = [
"cython>=0.29,<0.30",
"numpy>=1.21",
"numpy>=1.21,<1.24",
"pyarrow==11.0.0.*",
"setuptools",
"wheel",
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = [
"dask==2023.3.2",
"distributed==2023.3.2.1",
"fsspec>=0.6.0",
"numpy>=1.21",
"numpy>=1.21,<1.24",
"pandas>=1.3,<1.6.0dev0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
classifiers = [
Expand Down