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

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Apr 7, 2023

Description

This PR builds libcuspatial and cuspatial conda packages using CUDA 12. Closes #925.

Based on rapidsai/cudf#12922.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@isVoid isVoid requested a review from a team as a code owner April 7, 2023 00:30
@github-actions github-actions bot added ci conda Related to conda and conda configuration labels Apr 7, 2023
@isVoid isVoid self-assigned this Apr 7, 2023
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Good start. Let’s minimize the dependencies. I don’t think cuSpatial requires all the same things as libcudf. I will revisit the math libraries question in a bit.

ci/build_cpp.sh Outdated Show resolved Hide resolved
conda/recipes/libcuspatial/conda_build_config.yaml Outdated Show resolved Hide resolved
conda/recipes/libcuspatial/meta.yaml Outdated Show resolved Hide resolved
@bdice bdice added the 5 - DO NOT MERGE Hold off on merging; see PR for details label Apr 7, 2023
@isVoid isVoid changed the title Build CUDA 12 packages of libcuspatial cuSpatial: Build CUDA 12 packages Apr 7, 2023
@ajschmidt8
Copy link
Member

Please use GitHub's Draft PR feature in the future. Draft PRs have the benefit of preventing notifications to codeowners until PRs are marked Ready for Review, which helps cut down on excessive notifications for PRs that are still being worked on. CI will still run on Draft PRs.

Some useful information about Draft PRs:

@ajschmidt8
Copy link
Member

Marking PR as draft.

@ajschmidt8 ajschmidt8 marked this pull request as draft April 7, 2023 17:31
@bdice
Copy link
Contributor

bdice commented Apr 7, 2023

I will revisit the math libraries question in a bit.

The math library dependency I was thinking of was cusparse, which was removed in this PR: #959. No math libraries are needed here, which simplifies things. 😄

conda/recipes/libcuspatial/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/libcuspatial/meta.yaml Outdated Show resolved Hide resolved
@isVoid isVoid changed the base branch from branch-23.06 to branch-23.08 June 12, 2023 15:14
@bdice
Copy link
Contributor

bdice commented Jun 29, 2023

CI is passing so I'm going to open this draft for review. I'll also start a review. 👍

@bdice bdice marked this pull request as ready for review June 29, 2023 14:05
@bdice bdice requested a review from a team as a code owner June 29, 2023 14:05
@bdice bdice requested a review from vyasr June 29, 2023 14:05
@bdice bdice removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label Jun 29, 2023
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I pushed a small change to leverage run_exports by putting -dev packages in the host section, so that they populate the run section implicitly. We adopted this approach in cudf because it plays better with the conda overlinking checker. Otherwise this looks good to me! I'd like a review from one other CUDA 12 expert before approving.

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

This is fairly close, but a couple of things need resolving and perhaps a bit of discussion.

conda/recipes/cuspatial/meta.yaml Show resolved Hide resolved
conda/recipes/cuspatial/meta.yaml Show resolved Hide resolved
cpp/cmake/thirdparty/get_libcudacxx.cmake Outdated Show resolved Hide resolved
cpp/cmake/thirdparty/get_thrust.cmake Outdated Show resolved Hide resolved
dependencies.yaml Show resolved Hide resolved
Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Michael and everyone reviewing! 🙏

Had a couple suggestions below

conda/recipes/libcuspatial/meta.yaml Outdated Show resolved Hide resolved
conda/recipes/libcuspatial/meta.yaml Show resolved Hide resolved
Comment on lines 69 to 72
ignore_run_exports_from:
- {{ compiler('cuda') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }}
{% 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.

conda/recipes/libcuspatial/meta.yaml Show resolved Hide resolved
- {{ 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).

conda/recipes/libcuspatial/meta.yaml Show resolved Hide resolved
conda/recipes/cuspatial/meta.yaml Outdated Show resolved Hide resolved
- {{ compiler('cuda') }}
{% if cuda_major == "11" %}
- {{ compiler('cuda11') }}
{% endif %}
requirements:
build:
- 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.

@github-actions github-actions bot removed the libcuspatial Relates to the cuSpatial C++ library label Jun 30, 2023
@isVoid isVoid requested a review from vyasr June 30, 2023 21:45
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

All looks good to me. Thanks @isVoid!

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

LGTM

@harrism
Copy link
Member

harrism commented Jul 6, 2023

/merge

@rapids-bot rapids-bot bot merged commit feff9eb into rapidsai:branch-23.08 Jul 6, 2023
@jakirkham
Copy link
Member

Discovered the cuspatial (Python) packages were not uploading for CUDA 12. This was due to the fact that the build/string of cuspatial needs the CUDA major version as well (similar to what is done for libcuspatial). Adding this in PR ( #1211 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci cmake Related to CMake code or build configuration conda Related to conda and conda configuration improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

cuSpatial: CUDA 12 Conda Packages
9 participants