From e2ec8ef7120acd9340340373afb64bb7ec2de2ea Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 24 Jul 2024 18:16:26 -0500 Subject: [PATCH] split up CUDA-suffixed dependencies in dependencies.yaml (#1057) Contributes to https://github.com/rapidsai/build-planning/issues/31 In short, RAPIDS DLFW builds want to produce wheels with unsuffixed dependencies, e.g. `cudf` depending on `rmm`, not `rmm-cu12`. This PR is part of a series across all of RAPIDS to try to support that type of build by setting up CUDA-suffixed and CUDA-unsuffixed dependency lists in `dependencies.yaml`. For more details, see: * https://github.com/rapidsai/build-planning/issues/31#issuecomment-2245815818 * https://github.com/rapidsai/cudf/pull/16183 ## Notes for Reviewers ### Why target 24.08? This is targeting 24.08 because: 1. it should be very low-risk 2. getting these changes into 24.08 prevents the need to carry around patches for every library in DLFW builds using RAPIDS 24.08 Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/ucx-py/pull/1057 --- .readthedocs.yml | 2 +- ci/release/update-version.sh | 7 +++--- dependencies.yaml | 46 +++++++++++++++++++++++++++++------- pyproject.toml | 1 + 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index a7bcccc2..bdd9eda8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,7 +10,7 @@ build: # and therefore tested in this no-CUDA environment - | pip install \ - -C rapidsai.matrix-entry="cuda=12.2" \ + -C rapidsai.matrix-entry="cuda=12.2;cuda_suffixed=true" \ . conda: diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 3dddd0fe..7eaf0161 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -40,10 +40,11 @@ function sed_runner() { DEPENDENCIES=( cudf ) -for FILE in dependencies.yaml; do - for DEP in "${DEPENDENCIES[@]}"; do - sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_RAPIDS_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" +for DEP in "${DEPENDENCIES[@]}"; do + for FILE in dependencies.yaml conda/environments/*.yml; do + sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" done + sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" pyproject.toml done for FILE in .github/workflows/*.yaml; do diff --git a/dependencies.yaml b/dependencies.yaml index fa4e4cac..324d2347 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -150,10 +150,14 @@ dependencies: # post release like 1.15.0.post1 - output_types: [requirements, pyproject] matrices: - - matrix: {cuda: "12.*"} + - matrix: + cuda: "12.*" + cuda_suffixed: "true" packages: - libucx-cu12>=1.15.0,<1.15.1 - - matrix: {cuda: "11.*"} + - matrix: + cuda: "11.*" + cuda_suffixed: "true" packages: - libucx-cu11>=1.15.0,<1.15.1 # this fallback is intentionally empty... it simplifies building from source @@ -173,10 +177,14 @@ dependencies: specific: - output_types: [requirements, pyproject] matrices: - - matrix: {cuda: "12.*"} + - matrix: + cuda: "12.*" + cuda_suffixed: "true" packages: - libucx-cu12>=1.15.0,<1.16 - - matrix: {cuda: "11.*"} + - matrix: + cuda: "11.*" + cuda_suffixed: "true" packages: - libucx-cu11>=1.15.0,<1.16 # this fallback is intentionally empty... it simplifies building from source @@ -196,20 +204,40 @@ dependencies: - pytest-rerunfailures - output_types: [conda] packages: - - &cudf_conda cudf==24.8.*,>=0.0.0a0 + - &cudf_unsuffixed cudf==24.8.*,>=0.0.0a0 - cupy>=12.0.0 specific: - output_types: [requirements, pyproject] matrices: - - matrix: {cuda: "12.*"} + - matrix: + cuda: "12.*" + cuda_suffixed: "true" packages: - cudf-cu12==24.8.*,>=0.0.0a0 - - cupy-cuda12x>=12.0.0 - - matrix: {cuda: "11.*"} + - &cupy_cu12 cupy-cuda12x>=12.0.0 + - matrix: + cuda: "12.*" + cuda_suffixed: "false" + packages: + - *cudf_unsuffixed + # NOTE: cupy still has a "-cuda12x" suffix here, because it's suffixed + # in DLFW builds + - *cupy_cu12 + - matrix: + cuda: "11.*" + cuda_suffixed: "true" packages: - cudf-cu11==24.8.*,>=0.0.0a0 - &cupy_cu11 cupy-cuda11x>=12.0.0 + - matrix: + cuda: "11.*" + cuda_suffixed: "false" + packages: + - *cudf_unsuffixed + # NOTE: cupy still has a "-cuda11x" suffix here, because it's suffixed + # in DLFW builds + - *cupy_cu11 - matrix: packages: - - *cudf_conda + - *cudf_unsuffixed - *cupy_cu11 diff --git a/pyproject.toml b/pyproject.toml index fc20b787..d14c1157 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,6 +119,7 @@ commit-files = [ # (this is overridden in wheel publishing) disable-cuda=true dependencies-file = "dependencies.yaml" +matrix-entry = "cuda_suffixed=true" requires = [ "cython>=3.0.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.