Avoid issues with nvcc compilation in c++ mode#3770
Merged
miscco merged 2 commits intoNVIDIA:mainfrom Feb 11, 2025
Merged
Conversation
griwes
approved these changes
Feb 11, 2025
Contributor
griwes
left a comment
There was a problem hiding this comment.
As a bandaid this is fine.
fbusato
approved these changes
Feb 11, 2025
|
|
||
| #if _CCCL_HAS_CUDA_COMPILER | ||
| // We need to ensure that we not only compile with a cuda compiler but also compile cuda source files | ||
| #if _CCCL_HAS_CUDA_COMPILER && (defined(__CUDACC__) || defined(_NVHPC_CUDA)) |
Contributor
There was a problem hiding this comment.
would be possible to add a specific macro for that?
Contributor
Author
There was a problem hiding this comment.
I believe that we need to fix the _CCCL_HAS_CUDA_COMPILER macro
It is meant to signify we are compiling cuda code and we should make sure it actually means that
Contributor
There was a problem hiding this comment.
I'm not really convinced by __CUDACC__ because it is defined when we compile .cu files. __umul64hi condition is more specific, i.e. cuda device code
Contributor
Author
There was a problem hiding this comment.
It was already in a device function so it was properly "guarded" the issue is that we only can consider device functions if we compile for cuda and not only c++
Contributor
🟩 CI finished in 1h 40m: Pass: 100%/151 | Total: 3d 05h | Avg: 30m 39s | Max: 1h 16m | Hits: 68%/239257
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 151)
| # | Runner |
|---|---|
| 108 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were simply using
_CCCL_HAS_CUDA_COMPILERand that is not sufficient to assume cuda compilationBut a bandaid on it so everything works again and then work on a proper fix