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

Stop CMake from marking cudf's libcudacxx and thrust includes as system #9277

Conversation

robertmaynard
Copy link
Contributor

nvcc automatically adds the CUDA Toolkit system include paths before any system include paths that CMake adds.

CMake implicitly treats all includes on import targets as 'SYSTEM' includes.

To get the cudacxx shipped with cudf to be picked up by consumers instead of the version shipped with the CUDA Toolkit we need to make sure it is a non-SYSTEM include on the CMake side.

nvcc automatically adds the CUDA Toolkit system include paths before any
system include paths that CMake adds.

CMake implicitly treats all includes on import targets as 'SYSTEM' includes.

To get the cudacxx shipped with cudf to be picked up by consumers instead of the
version shipped with the CUDA Toolkit we need to make sure it is a non-SYSTEM
include on the CMake side.
@robertmaynard robertmaynard added bug Something isn't working 3 - Ready for Review Ready for review by team CMake CMake build issue non-breaking Non-breaking change labels Sep 22, 2021
@robertmaynard robertmaynard requested a review from a team as a code owner September 22, 2021 21:14
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Sep 22, 2021
@jakirkham
Copy link
Member

rerun tests

@codecov
Copy link

codecov bot commented Sep 23, 2021

Codecov Report

Merging #9277 (35c8aaf) into branch-21.10 (3ee3ecf) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.10    #9277      +/-   ##
================================================
- Coverage         10.85%   10.80%   -0.06%     
================================================
  Files               115      116       +1     
  Lines             19158    19321     +163     
================================================
+ Hits               2080     2087       +7     
- Misses            17078    17234     +156     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/_lib/__init__.py 0.00% <ø> (ø)
python/cudf/cudf/io/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/text.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/ioutils.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/csv.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/orc.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/parquet.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/dtypes.py 0.00% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f08d6f1...35c8aaf. Read the comment docs.

Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Couple of questions.

# version shipped with the CUDA Toolkit we need to make sure it is a non-SYSTEM
# include on the CMake side.
#
# Todo this currently we move the includes from the cudf::cudf target to a
Copy link
Member

Choose a reason for hiding this comment

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

Is this a TODO? Or are you saying "To do this currently, we move..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am saying "To do this currently, ... ". I will revise the comment to be clear.

# nvcc automatically adds the CUDA Toolkit system include paths before any
# system include paths that CMake adds.
#
# CMake implicitly treats all includes on import targets as 'SYSTEM' includes.
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm, so this is the root cause? Would it be possible to make this configurable in a future CMake version to avoid all the below complexity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes the root cause is implicit behavior in CMake, and I am working on upstreaming solutions to CMake for this issue.

@harrism
Copy link
Member

harrism commented Sep 23, 2021

Is this needed in 21.10?

@robertmaynard
Copy link
Contributor Author

Is this needed in 21.10?

I defer to @trxcllnt who reported the issue to me

@trxcllnt
Copy link
Contributor

@harrism this is necessary for anyone using the libcudf CMake library targets. Without this, the CUDA toolkit's libcu++ paths will take precedence over libcudf's, and including libcudf headers that have libcu++ includes will fail their project's build.

@ajschmidt8 ajschmidt8 merged commit b450ec0 into rapidsai:branch-21.10 Sep 29, 2021
@robertmaynard robertmaynard deleted the make_cudacxx_and_thrust_includes_non-system branch October 4, 2021 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working CMake CMake build issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants