Skip to content

Commit

Permalink
handle more RAPIDS version formats in update-version.sh, refactor dep…
Browse files Browse the repository at this point in the history
…endencies.yaml (#1329)

Contributes to rapidsai/build-planning#13.

Updates `update-version.sh` to correctly handle RAPIDS dependencies like `cudf-cu12==24.2.*`.

This also pulls in some dependency refactoring originally added in #1320, which allows greater use of dependencies.yaml globs (and therefore less maintenance effort to support new CUDA versions).

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #1329
  • Loading branch information
jameslamb authored Jan 25, 2024
1 parent 0eadc2d commit 5e0cb36
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 68 deletions.
6 changes: 3 additions & 3 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ DEPENDENCIES=(

for DEP in "${DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "/-.* ${DEP}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/g" ${FILE}
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/g" "${FILE}"
done
sed_runner "s/${DEP}==.*\",/${DEP}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cuspatial/pyproject.toml
sed_runner "s/${DEP}==.*\",/${DEP}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cuproj/pyproject.toml
sed_runner "s/${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==.*\",/${DEP}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cuspatial/pyproject.toml
sed_runner "s/${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==.*\",/${DEP}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cuproj/pyproject.toml
done

# Dependency versions in dependencies.yaml
Expand Down
87 changes: 22 additions & 65 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ dependencies:
packages:
- nvcc_linux-aarch64=11.8
- matrix:
cuda: "12.0"
cuda: "12.*"
packages:
- cuda-nvcc
build_cpp_cuproj:
Expand Down Expand Up @@ -198,7 +198,7 @@ dependencies:
packages:
- nvcc_linux-aarch64=11.8
- matrix:
cuda: "12.0"
cuda: "12.*"
packages:
- cuda-nvcc
build_python:
Expand Down Expand Up @@ -359,17 +359,12 @@ dependencies:
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.2"}
packages: &rmm_packages_pip_cu12
- matrix: {cuda: "12.*"}
packages:
- rmm-cu12==24.4.*
- {matrix: {cuda: "12.1"}, packages: *rmm_packages_pip_cu12}
- {matrix: {cuda: "12.0"}, packages: *rmm_packages_pip_cu12}
- matrix: {cuda: "11.8"}
packages: &rmm_packages_pip_cu11
- matrix: {cuda: "11.*"}
packages:
- rmm-cu11==24.4.*
- {matrix: {cuda: "11.5"}, packages: *rmm_packages_pip_cu11}
- {matrix: {cuda: "11.4"}, packages: *rmm_packages_pip_cu11}
- {matrix: {cuda: "11.2"}, packages: *rmm_packages_pip_cu11}
- {matrix: null, packages: [*rmm_conda]}

depends_on_cudf:
Expand All @@ -385,17 +380,12 @@ dependencies:
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.2"}
packages: &cudf_packages_pip_cu12
- matrix: {cuda: "12.*"}
packages:
- cudf-cu12==24.4.*
- {matrix: {cuda: "12.1"}, packages: *cudf_packages_pip_cu12}
- {matrix: {cuda: "12.0"}, packages: *cudf_packages_pip_cu12}
- matrix: {cuda: "11.8"}
packages: &cudf_packages_pip_cu11
- matrix: {cuda: "11.*"}
packages:
- cudf-cu11==24.4.*
- {matrix: {cuda: "11.5"}, packages: *cudf_packages_pip_cu11}
- {matrix: {cuda: "11.4"}, packages: *cudf_packages_pip_cu11}
- {matrix: {cuda: "11.2"}, packages: *cudf_packages_pip_cu11}
- {matrix: null, packages: [*cudf_conda]}

depends_on_cuml:
Expand All @@ -411,17 +401,12 @@ dependencies:
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.2"}
packages: &cuml_packages_pip_cu12
- matrix: {cuda: "12.*"}
packages:
- cuml-cu12==24.4.*
- {matrix: {cuda: "12.1"}, packages: *cuml_packages_pip_cu12}
- {matrix: {cuda: "12.0"}, packages: *cuml_packages_pip_cu12}
- matrix: {cuda: "11.8"}
packages: &cuml_packages_pip_cu11
- matrix: {cuda: "11.*"}
packages:
- cuml-cu11==24.4.*
- {matrix: {cuda: "11.5"}, packages: *cuml_packages_pip_cu11}
- {matrix: {cuda: "11.4"}, packages: *cuml_packages_pip_cu11}
- {matrix: {cuda: "11.2"}, packages: *cuml_packages_pip_cu11}
- {matrix: null, packages: [*cuml_conda]}

depends_on_cuspatial:
Expand All @@ -437,17 +422,12 @@ dependencies:
specific:
- output_types: [requirements, pyproject]
matrices:
- matrix: {cuda: "12.2"}
packages: &cuspatial_packages_pip_cu12
- matrix: {cuda: "12.*"}
packages:
- cuspatial-cu12==24.4.*
- {matrix: {cuda: "12.1"}, packages: *cuspatial_packages_pip_cu12}
- {matrix: {cuda: "12.0"}, packages: *cuspatial_packages_pip_cu12}
- matrix: {cuda: "11.8"}
packages: &cuspatial_packages_pip_cu11
- matrix: {cuda: "11.*"}
packages:
- cuspatial-cu11==24.4.*
- {matrix: {cuda: "11.5"}, packages: *cuspatial_packages_pip_cu11}
- {matrix: {cuda: "11.4"}, packages: *cuspatial_packages_pip_cu11}
- {matrix: {cuda: "11.2"}, packages: *cuspatial_packages_pip_cu11}
- {matrix: null, packages: [*cuspatial_conda]}

depends_on_cupy:
Expand All @@ -458,33 +438,10 @@ dependencies:
specific:
- output_types: [requirements, pyproject]
matrices:
# All CUDA 12 + x86_64 versions
- matrix: {cuda: "12.2", arch: x86_64}
packages: &cupy_packages_cu12_x86_64
- matrix: {cuda: "12.*"}
packages:
- cupy-cuda12x>=12.0.0
- {matrix: {cuda: "12.1", arch: x86_64}, packages: *cupy_packages_cu12_x86_64}
- {matrix: {cuda: "12.0", arch: x86_64}, packages: *cupy_packages_cu12_x86_64}

# All CUDA 12 + aarch64 versions
- matrix: {cuda: "12.2", arch: aarch64}
packages: &cupy_packages_cu12_aarch64
- cupy-cuda12x -f https://pip.cupy.dev/aarch64 # TODO: Verify that this works.
- {matrix: {cuda: "12.1", arch: aarch64}, packages: *cupy_packages_cu12_aarch64}
- {matrix: {cuda: "12.0", arch: aarch64}, packages: *cupy_packages_cu12_aarch64}

# All CUDA 11 + x86_64 versions
- matrix: {cuda: "11.8", arch: x86_64}
packages: &cupy_packages_cu11_x86_64
- matrix: {cuda: "11.*"}
packages:
- cupy-cuda11x>=12.0.0
- {matrix: {cuda: "11.5", arch: x86_64}, packages: *cupy_packages_cu11_x86_64}
- {matrix: {cuda: "11.4", arch: x86_64}, packages: *cupy_packages_cu11_x86_64}
- {matrix: {cuda: "11.2", arch: x86_64}, packages: *cupy_packages_cu11_x86_64}

# All CUDA 11 + aarch64 versions
- matrix: {cuda: "11.8", arch: aarch64}
packages: &cupy_packages_cu11_aarch64
- cupy-cuda11x -f https://pip.cupy.dev/aarch64 # TODO: Verify that this works.
- {matrix: {cuda: "11.5", arch: aarch64}, packages: *cupy_packages_cu11_aarch64}
- {matrix: {cuda: "11.4", arch: aarch64}, packages: *cupy_packages_cu11_aarch64}
- {matrix: {cuda: "11.2", arch: aarch64}, packages: *cupy_packages_cu11_aarch64}
- {matrix: null, packages: [cupy-cuda11x>=12.0.0]}

0 comments on commit 5e0cb36

Please sign in to comment.