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

cuSpatial: Build CUDA 12 packages #1044

Merged
merged 54 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d6abd8d
initial porting of rapidsai/cudf/12922
isVoid Apr 7, 2023
faaec0c
add libcudf channel
isVoid Apr 7, 2023
27a4ae9
remove most cuda dependencies
isVoid Apr 7, 2023
011f1b5
add libcupti
isVoid Apr 7, 2023
9e22857
add cudart
isVoid Apr 7, 2023
6b8e198
add cudart-dev
isVoid Apr 7, 2023
b17dc52
add cudart-static
isVoid Apr 7, 2023
26faa51
add cuda-driver
isVoid Apr 7, 2023
01b5c6b
Use libcudf with CUDA major build string.
bdice Apr 7, 2023
b878052
add cuda_driver_version
isVoid Apr 7, 2023
362535d
add cuda12 compiler for python build
isVoid Apr 7, 2023
4be8e48
add major_version
isVoid Apr 7, 2023
93db8af
Revert "add cuda12 compiler for python build"
isVoid Apr 7, 2023
7a34966
Revert "add major_version"
isVoid Apr 7, 2023
ded69e2
Merge branch 'branch-23.08' of https://github.com/rapidsai/cuspatial …
isVoid Jun 23, 2023
7e0e324
Remove temporary pull artifacts now that rmm and cudf cuda12 bringup …
isVoid Jun 23, 2023
96b046e
Add cuda12.0 to dependency matrix
isVoid Jun 23, 2023
1b948db
update meta.yaml, dependencies according to cuda12 bring up instructions
isVoid Jun 23, 2023
4f65bce
use default channel to test cpp, unpin libcudf, librmm cuda version
isVoid Jun 23, 2023
24b58ba
undo version bump
isVoid Jun 23, 2023
2a47eed
disable cupti in nvbench
isVoid Jun 23, 2023
5b48690
Remove all the packages except -dev, sort by cuda version
isVoid Jun 23, 2023
98e0d45
Remove cudart package, remove cupti package, remove compiler run_expo…
isVoid Jun 23, 2023
2ad9a11
style
isVoid Jun 23, 2023
c0d5d7a
Fix cmake argument typo
isVoid Jun 23, 2023
6296179
Add scripts to pull thrust from rapids-cmake
isVoid Jun 26, 2023
121552b
Remove cuda version pinning with libcudf/librmm
isVoid Jun 26, 2023
0699874
Add thrust patches
isVoid Jun 26, 2023
990354f
install thrust into custom location
isVoid Jun 26, 2023
2258168
Fix get_thrust
isVoid Jun 26, 2023
f66f8b8
add libcudacxx cpm
isVoid Jun 27, 2023
6122002
Apply suggestions from code review
bdice Jun 27, 2023
72e3267
Apply suggestions from code review
bdice Jun 27, 2023
171b964
Use cuda-version.
bdice Jun 27, 2023
d31c795
Update environment.
bdice Jun 27, 2023
20e175f
Merge branch 'branch-23.08' into conda-cuda-12
bdice Jun 27, 2023
4f2e4ad
Add dependencies to CUDA 12 env.
bdice Jun 27, 2023
c99105f
experiment removing nvcc requirement in python build recipe
isVoid Jun 28, 2023
f6cdb0e
add cuda compiler for python build, cuda12
isVoid Jun 28, 2023
566cda0
Merge branch 'conda-cuda-12' of github.com:isVoid/cuspatial into cond…
isVoid Jun 28, 2023
e3faf15
add CTK to host environment
isVoid Jun 28, 2023
640399a
Removing host CTK environment
isVoid Jun 28, 2023
baee048
Revert, add ctk to cuda11 host environment
isVoid Jun 28, 2023
5b6372d
Change preset cuda_compiler name
isVoid Jun 28, 2023
cbd9ac1
Fix host/run sections using run_exports.
bdice Jun 29, 2023
d2a20f9
Only ignore CUDA compiler run_exports for CUDA 11.
bdice Jun 29, 2023
2e7120a
Attempt to remove custom patching for libcudacxx and thrust
isVoid Jun 30, 2023
1688b39
update python dependencies with cuda12 pip packages
isVoid Jun 30, 2023
1264b1f
removing custom fetching for libcudacxx and thrust
isVoid Jun 30, 2023
0e55484
remove ctk where compiler already defines
isVoid Jun 30, 2023
7e8363b
remove compiler run export ignore where compiler dependency was not d…
isVoid Jun 30, 2023
bff32db
Remove ninja requirement in build
isVoid Jun 30, 2023
cb3fb6f
Remove unused `cuda_spec`
isVoid Jun 30, 2023
b2a5d4a
Remove run_export ignore for libcuspatial-test
isVoid Jun 30, 2023
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: 6 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -56,7 +56,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
sha: ${{ inputs.sha }}
wheel-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -80,7 +80,7 @@ jobs:
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-publish.yml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,40 @@ jobs:
- wheel-build
- wheel-tests
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-120
checks:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@cuda-120
with:
enable_check_generated_files: false
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@cuda-120
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@cuda-120
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@cuda-120
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120
with:
build_type: pull-request
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -65,7 +65,7 @@ jobs:
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@cuda-120
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -75,7 +75,7 @@ jobs:
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-build.yml@cuda-120
with:
build_type: pull-request
package-dir: python/cuspatial
Expand All @@ -84,7 +84,7 @@ jobs:
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@cuda-120
with:
build_type: pull-request
package-name: cuspatial
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ on:
jobs:
conda-cpp-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@cuda-120
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@cuda-120
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux-test.yml@cuda-120
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
3 changes: 2 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rapids-print-env

rapids-logger "Begin cpp build"

rapids-mamba-retry mambabuild conda/recipes/libcuspatial
rapids-mamba-retry mambabuild \
conda/recipes/libcuspatial

rapids-upload-conda-to-s3 cpp
3 changes: 2 additions & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ channels:
dependencies:
- c-compiler
- cmake>=3.26.4
- cudatoolkit=11.8
- cuda-version=11.8
- cudatoolkit
- cudf==23.8.*
- cuml==23.8.*
- cxx-compiler
Expand Down
49 changes: 49 additions & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This file is generated by `rapids-dependency-file-generator`.
# To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
channels:
- rapidsai
- rapidsai-nightly
- conda-forge
- nvidia
dependencies:
- c-compiler
- cmake>=3.26.4
- cuda-cudart-dev
- cuda-nvcc
- cuda-nvrtc-dev
- cuda-version=12.0
- cudf==23.8.*
- cuml==23.8.*
- cxx-compiler
- cython>=0.29,<0.30
- doxygen
- gcc_linux-64=11.*
- geopandas>=0.11.0
- gmock>=1.13.0
- gtest>=1.13.0
- ipython
- ipywidgets
- libcudf==23.8.*
- librmm==23.8.*
- myst-parser
- nbsphinx
- ninja
- notebook
- numpydoc
- pre-commit
- proj
- pydata-sphinx-theme
- pydeck
- pytest
- pytest-cov
- pytest-xdist
- python>=3.9,<3.11
- rmm==23.8.*
- scikit-build>=0.13.1
- scikit-image
- setuptools
- shapely
- sphinx<6
- sqlite
- sysroot_linux-64==2.17
name: all_cuda-120_arch-x86_64
3 changes: 3 additions & 0 deletions conda/recipes/cuspatial/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cxx_compiler_version:
- 11

cuda_compiler:
- cuda-nvcc

cuda11_compiler:
- nvcc

sysroot_version:
Expand Down
22 changes: 19 additions & 3 deletions conda/recipes/cuspatial/meta.yaml
vyasr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
{% set py_version = environ['CONDA_PY'] %}
{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %}
{% set cuda_major = cuda_version.split('.')[0] %}
{% set py_version = environ['CONDA_PY'] %}
vyasr marked this conversation as resolved.
Show resolved Hide resolved
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

package:
Expand Down Expand Up @@ -33,16 +34,27 @@ build:
- SCCACHE_S3_USE_SSL
- SCCACHE_S3_NO_CREDENTIALS
ignore_run_exports_from:
- {{ compiler('cuda') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }}
{% endif %}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} {{ cuda_version }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }} ={{ cuda_version }}
{% else %}
- {{ compiler('cuda') }}
{% endif %}
- cuda-version ={{ cuda_version }}
- ninja
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
isVoid marked this conversation as resolved.
Show resolved Hide resolved
- cuda-version ={{ cuda_version }}
- cmake {{ cmake_version }}
- cudf ={{ minor_version }}
- cython >=0.29,<0.30
Expand All @@ -52,6 +64,10 @@ requirements:
- scikit-build >=0.13.1
- setuptools
run:
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
- cudf ={{ minor_version }}
- geopandas >=0.11.0
- python
Expand Down
5 changes: 3 additions & 2 deletions conda/recipes/libcuspatial/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
# Copyright (c) 2018-2023, NVIDIA CORPORATION.

# build cuspatial with verbose output
./build.sh -v libcuspatial tests benchmarks --allgpuarch -n
./build.sh -v libcuspatial tests benchmarks --allgpuarch -n \
--cmake-args=\"-DNVBench_ENABLE_CUPTI=OFF\"
3 changes: 3 additions & 0 deletions conda/recipes/libcuspatial/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cxx_compiler_version:
- 11

cuda_compiler:
- cuda-nvcc

cuda11_compiler:
- nvcc

cmake_version:
Expand Down
44 changes: 38 additions & 6 deletions conda/recipes/libcuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@ build:
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cuda') }} {{ cuda_version }}
- {{ compiler('cxx') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }} ={{ cuda_version }}
{% else %}
- {{ compiler('cuda') }}
{% endif %}
- cuda-version ={{ cuda_version }}
- cmake {{ cmake_version }}
- ninja
- sysroot_{{ target_platform }} {{ sysroot_version }}
host:
- cudatoolkit ={{ cuda_version }}
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
isVoid marked this conversation as resolved.
Show resolved Hide resolved
- cuda-version ={{ cuda_version }}
- doxygen
- gmock {{ gtest_version }}
- gtest {{ gtest_version }}
Expand All @@ -59,13 +67,25 @@ outputs:
run_exports:
- {{ pin_subpackage("libcuspatial", max_pin="x.x") }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }}
isVoid marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed the run_exports of these compilers are ignored, but the compilers are not listed in build. Do we intend to have the compilers or is this section unneeded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably unneeded. Removed and trying if CI passes.

requirements:
build:
bdice marked this conversation as resolved.
Show resolved Hide resolved
- cmake {{ cmake_version }}
- ninja
host:
- cuda-version ={{ cuda_version }}
{% if cuda_major == "11" %}
- cudatoolkit
{% else %}
- cuda-cudart-dev
{% endif %}
bdice marked this conversation as resolved.
Show resolved Hide resolved
run:
- cudatoolkit {{ cuda_spec }}
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
- libcudf ={{ minor_version }}
- librmm ={{ minor_version }}
- sqlite
Expand All @@ -86,12 +106,24 @@ outputs:
number: {{ GIT_DESCRIBE_NUMBER }}
string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
ignore_run_exports_from:
- {{ compiler('cuda') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }}
{% endif %}
requirements:
build:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have the compilers here?

Suggested change
build:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }} ={{ cuda_version }}
{% else %}
- {{ compiler('cuda') }}
{% endif %}
- sysroot_{{ target_platform }} {{ sysroot_version }}

Copy link
Contributor

@bdice bdice Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we have already finished compilation by the time we're packaging libcuspatial and libcuspatial-tests. Compilers are needed in the top-level build section for use by build.sh, but the individual package outputs only install (copy) files to the conda environment and do not perform compilation.

The only argument I could see for adding compilers would be to influence the host/run environments via run_exports but I think that is not necessary here (we haven't traditionally done this).

- cmake {{ cmake_version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need ninja here too (as it is used elsewhere)?

Suggested change
- cmake {{ cmake_version }}
- cmake {{ cmake_version }}
- ninja

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we do not need ninja here. Ninja should be in the top-level build but not the subpackages' build sections.

host:
- cuda-version ={{ cuda_version }}
{% if cuda_major == "11" %}
- cudatoolkit
{% else %}
- cuda-cudart-dev
{% endif %}
bdice marked this conversation as resolved.
Show resolved Hide resolved
run:
- {{ pin_subpackage('libcuspatial', exact=True) }}
- cudatoolkit {{ cuda_spec }}
{% if cuda_major == "11" %}
- cudatoolkit
{% endif %}
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}
- gmock {{ gtest_version }}
- gtest {{ gtest_version }}
4 changes: 4 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ include(cmake/Modules/ConfigureCUDA.cmake)

# add third party dependencies using CPM
rapids_cpm_init()
# find rapids-cmake configured libcudacxx, not from system CCCL
include(cmake/thirdparty/get_libcudacxx.cmake)
# find rapids-cmake configured thrust, not from system CCCL
include(cmake/thirdparty/get_thrust.cmake)
# find or add cuDF
include(cmake/thirdparty/get_cudf.cmake)
# find or install GoogleTest
Expand Down
Loading