Provide CCCL_HOST_COMPILER macro - #11195
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe PR adds ChangesHost compiler detection
Merge Risk: ⚪ Minimal · up to This change adds and documents host-compiler detection macros with compile-time coverage. No concrete merge-blocking risk is currently identified. Comment |
This comment has been minimized.
This comment has been minimized.
davebayer
left a comment
There was a problem hiding this comment.
I'm fine with the idea of exposing these macros, but I think we shouldn't expose those MSVC20XX macros.
Also, what about clang-cl, do our users care about that one?
| #define _CCCL_HOST_COMPILER_MAKE_VERSION(_MAJOR, _MINOR) _CCCL_COMPILER_MAKE_VERSION(_MAJOR, _MINOR) | ||
| #define _CCCL_HOST_COMPILER_NVHPC() _CCCL_COMPILER_NVHPC() | ||
| #define _CCCL_HOST_COMPILER_CLANG() _CCCL_COMPILER_CLANG() | ||
| #define _CCCL_HOST_COMPILER_GCC() _CCCL_COMPILER_GCC() |
There was a problem hiding this comment.
I find it a bit dangerous because we do not handle known compilers like
Apple-Clang and Intel-LLVM
There was a problem hiding this comment.
Supporting compilers outside of what is guaranteed by the CUDA toolkit is not really expected.
(I meant, users should use CCCL outside CUDA supported platforms).
Do you have suggestions? I would add a note that other compilers are UB. (disable them looks bad)
|
I love that of all PRs this is triggering SASS changes ^^ |
This comment has been minimized.
This comment has been minimized.
🤯this makes no sense to me |
This PR explains the problem #11191 |
🔬 CUB benchmark SASS comparisonHow to request a benchmark run
Targets with a SASS change
|
🥳 CI Workflow Results🟩 Finished in 4h 53m: Pass: 100%/195 | Total: 4d 23h | Max: 4h 52m | Hits: 52%/1367847See results here. |
Description
(Hope not too controversal). The PR provides the public macro
CCCL_HOST_COMPILER()to identify gcc, clang, msvc, nvhpc and their specific versions. The macro aliases_CCCL_COMPILER().The macro is aligned with
CCCL_OSandCCCL_HOST_ARCH.Address #8247