-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR enables building wheels. It mostly leverages various build options that have already been added to the repository. Authors: - Vyas Ramasubramani (https://github.com/vyasr) - Sevag H (https://github.com/sevagh) - Paul Taylor (https://github.com/trxcllnt) Approvers: - Bradley Dice (https://github.com/bdice) - GALI PREM SAGAR (https://github.com/galipremsagar) - Sevag H (https://github.com/sevagh) URL: #12096
- Loading branch information
Showing
12 changed files
with
364 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: cuDF wheels | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
versioneer-override: | ||
type: string | ||
default: '' | ||
build-tag: | ||
type: string | ||
default: '' | ||
branch: | ||
required: true | ||
type: string | ||
date: | ||
required: true | ||
type: string | ||
sha: | ||
required: true | ||
type: string | ||
build-type: | ||
type: string | ||
default: nightly | ||
|
||
concurrency: | ||
group: "cudf-${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cudf-wheels: | ||
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main | ||
with: | ||
repo: rapidsai/cudf | ||
|
||
build-type: ${{ inputs.build-type }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
|
||
package-dir: python/cudf | ||
package-name: cudf | ||
|
||
python-package-versioneer-override: ${{ inputs.versioneer-override }} | ||
python-package-build-tag: ${{ inputs.build-tag }} | ||
|
||
skbuild-configure-options: "-DCUDF_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF" | ||
|
||
test-extras: test | ||
|
||
# Have to manually specify the cupy install location on arm. | ||
# Have to also manually install tokenizers==0.10.2, which is the last tokenizers | ||
# to have a binary aarch64 wheel available on PyPI | ||
# Otherwise, the tokenizers sdist is used, which needs a Rust compiler | ||
test-before-arm64: "pip install tokenizers==0.10.2 cupy-cuda11x -f https://pip.cupy.dev/aarch64" | ||
|
||
test-unittest: "pytest -v -n 8 ./python/cudf/cudf/tests" | ||
secrets: inherit | ||
dask_cudf-wheel: | ||
needs: cudf-wheels | ||
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure.yml@main | ||
with: | ||
repo: rapidsai/cudf | ||
|
||
build-type: ${{ inputs.build-type }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
|
||
package-dir: python/dask_cudf | ||
package-name: dask_cudf | ||
|
||
python-package-versioneer-override: ${{ inputs.versioneer-override }} | ||
python-package-build-tag: ${{ inputs.build-tag }} | ||
|
||
test-extras: test | ||
test-unittest: "pytest -v -n 8 ./python/dask_cudf/dask_cudf/tests" | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
|
||
"""Custom build backend for cudf to get versioned requirements. | ||
Based on https://setuptools.pypa.io/en/latest/build_meta.html | ||
""" | ||
import os | ||
from functools import wraps | ||
|
||
from setuptools import build_meta as _orig | ||
|
||
# Alias the required bits | ||
build_wheel = _orig.build_wheel | ||
build_sdist = _orig.build_sdist | ||
|
||
|
||
def replace_requirements(func): | ||
@wraps(func) | ||
def wrapper(config_settings=None): | ||
orig_list = getattr(_orig, func.__name__)(config_settings) | ||
append_list = [ | ||
f"rmm{os.getenv('RAPIDS_PY_WHEEL_CUDA_SUFFIX', default='')}" | ||
] | ||
return orig_list + append_list | ||
|
||
return wrapper | ||
|
||
|
||
get_requires_for_build_wheel = replace_requirements( | ||
_orig.get_requires_for_build_wheel | ||
) | ||
get_requires_for_build_sdist = replace_requirements( | ||
_orig.get_requires_for_build_sdist | ||
) | ||
get_requires_for_build_editable = replace_requirements( | ||
_orig.get_requires_for_build_editable | ||
) |
Oops, something went wrong.