[BACKPORT]: tweak the cccl compiler version check macros to better agree with intuition (#4279)#4287
Merged
miscco merged 2 commits intoNVIDIA:branch/3.0.xfrom Apr 9, 2025
Merged
Conversation
…uition (NVIDIA#4279) * tweak the cccl compiler version check macros to better agree with intuition prior to this commit, a compiler check such as: ```c++ ``` would fail if the compiler was actually v19.1. that is because 19.1 is greater than 19. what the author of this code probably intended was to check only the compiler's major version number, in which case the check would have succeed. this commit changes the behavior of the following macros when only a major version number is specified: * `_CCCL_COMPILER` * `_CCCL_CUDA_COMPILER` * `_CCCL_CUDACC_BELOW` * `_CCCL_CUDACC_AT_LEAST` * guard `_CCCL_COMPILER(FOO)` with an extra set of parens
bernhardmgruber
approved these changes
Mar 31, 2025
Contributor
🟩 CI finished in 3h 52m: Pass: 100%/162 | Total: 1d 22h | Avg: 17m 23s | Max: 1h 19m | Hits: 85%/252469
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 113 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 12 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 5 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
Contributor
🟩 CI finished in 1h 40m: Pass: 100%/162 | Total: 2d 15h | Avg: 23m 35s | Max: 1h 27m | Hits: 77%/252432
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | stdpar |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 162)
| # | Runner |
|---|---|
| 113 | linux-amd64-cpu16 |
| 15 | windows-amd64-cpu16 |
| 12 | linux-arm64-cpu16 |
| 8 | linux-amd64-gpu-rtx2080-latest-1 |
| 6 | linux-amd64-gpu-rtxa6000-latest-1 |
| 5 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-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.
prior to this commit, a compiler check such as:
would fail if the compiler was actually v19.1. that is because 19.1 is
greater than 19. what the author of this code probably intended was to
check only the compiler's major version number, in which case the check
would have succeed.
this commit changes the behavior of the following macros when only a
major version number is specified:
_CCCL_COMPILER_CCCL_CUDA_COMPILER_CCCL_CUDACC_BELOW_CCCL_CUDACC_AT_LEASTguard
_CCCL_COMPILER(FOO)with an extra set of parens