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

[DO NOT MERGE] Test Python limited API compilation #278

Draft
wants to merge 3 commits into
base: branch-24.10
Choose a base branch
from
Draft
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
12 changes: 11 additions & 1 deletion .github/workflows/build-all-rapids-repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,17 @@ jobs:
build_command: |
sccache -z;
sccache --show-adv-stats;
clone-all -j$(nproc) -v -q --clone-upstream --single-branch --shallow-submodules;
# Need Python 3.11 for the buffer protocol in the limited API
export PYTHON_VERSION="3.11"
clone-all -j$(nproc) -v -q --clone-upstream --single-branch --shallow-submodules --no-update-env;
rapids-generate-scripts
. rapids-make-${PYTHON_PACKAGE_MANAGER}-env
# The latest version of this branch includes both my patches (required
# for RAPIDS Cython usage to work) and upstream patches required for
# Cython itself to work under the limited API.
export NO_CYTHON_COMPILE=true
python -m pip install git+https://github.com/cython/cython.git@limited-api-preview

build-all \
-v \
-j$(nproc --ignore=1) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- name: rmm
sub_dir: python/rmm
depends: [rmm]
args: {install: *rapids_build_backend_args}
args: {install: *rapids_build_backend_args, cmake: -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'"}

- name: ucxx
path: ucxx
Expand All @@ -41,11 +41,11 @@ repos:
- name: ucxx
sub_dir: python/ucxx
depends: [ucxx]
args: {cmake: -DFIND_UCXX_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_UCXX_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: distributed-ucxx
sub_dir: python/distributed-ucxx
depends: [ucxx]
args: {cmake: -DFIND_UCXX_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_UCXX_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}

- name: kvikio
path: kvikio
Expand All @@ -62,7 +62,7 @@ repos:
- name: kvikio
sub_dir: python/kvikio
depends: [KvikIO]
args: {install: *rapids_build_backend_args}
args: {install: *rapids_build_backend_args, cmake: -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'"}

- name: cudf
path: cudf
Expand All @@ -82,11 +82,11 @@ repos:
- name: pylibcudf
sub_dir: python/pylibcudf
depends: [cudf]
args: {install: *rapids_build_backend_args}
args: {cmake: -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: cudf
sub_dir: python/cudf
depends: [cudf]
args: {install: *rapids_build_backend_args}
args: {cmake: -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: dask_cudf
sub_dir: python/dask_cudf
args: {install: *rapids_build_backend_args}
Expand Down Expand Up @@ -115,11 +115,11 @@ repos:
- name: pylibraft
sub_dir: python/pylibraft
depends: [raft]
args: {cmake: -DFIND_RAFT_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_RAFT_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: raft-dask
sub_dir: python/raft-dask
depends: [ucxx, raft]
args: {cmake: -DFIND_RAFT_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_RAFT_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}

- name: cuvs
path: cuvs
Expand All @@ -135,7 +135,7 @@ repos:
- name: cuvs
sub_dir: python/cuvs
depends: [cuvs]
args: {cmake: -DFIND_CUVS_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_CUVS_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}

- name: cumlprims_mg
path: cumlprims_mg
Expand All @@ -158,7 +158,7 @@ repos:
- name: cuml
sub_dir: python/cuml
depends: [cuml]
args: {cmake: -DFIND_CUML_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_CUML_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}

- name: cugraph-ops
path: cugraph-ops
Expand Down Expand Up @@ -220,11 +220,11 @@ repos:
- name: pylibcugraph
sub_dir: python/pylibcugraph
depends: [cugraph]
args: {cmake: -DFIND_CUGRAPH_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_CUGRAPH_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: cugraph
sub_dir: python/cugraph
depends: [cugraph]
args: {cmake: -DFIND_CUGRAPH_CPP=ON, install: *rapids_build_backend_args}
args: {cmake: -DFIND_CUGRAPH_CPP=ON -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
- name: nx-cugraph
sub_dir: python/nx-cugraph
args: {install: *rapids_build_backend_args}
Expand Down Expand Up @@ -263,11 +263,12 @@ repos:
# it doesn't have a build dir of its own. That means we can't list it as
# a cpp repo after cuspatial (above), and we have to manually point CMake
# to the cuspatial build dir here.
# Limited API compilation of cuproje currently fails due to https://github.com/cython/cython/issues/6405
args:
cmake: |
-DFIND_CUPROJ_CPP=ON
-Dcuproj_ROOT="${HOME}/cuspatial/cpp/build/${PYTHON_PACKAGE_MANAGER}/cuda-${CUDA_VERSION}/latest"
- name: cuspatial
sub_dir: python/cuspatial
depends: [cuspatial]
args: {install: *rapids_build_backend_args}
args: {cmake: -DCMAKE_CXX_FLAGS="'-DPy_LIMITED_API=0x030B0000 -DCYTHON_LIMITED_API=1'", install: *rapids_build_backend_args}
Loading