api!: rename the public CCCL_VERSION family to HIPCCL_* - #30
Open
obersteiner wants to merge 1 commit into
Open
Conversation
The version macros exposed by libhipcxx carried NVIDIA's CCCL branding, which is misleading for consumers of a HIP library: CCCL_VERSION named libhipcxx's own release number, not any NVIDIA component's. Rename the whole public family so the names match the project: CCCL_VERSION -> HIPCCL_VERSION CCCL_MAJOR_VERSION -> HIPCCL_MAJOR_VERSION CCCL_MINOR_VERSION -> HIPCCL_MINOR_VERSION CCCL_PATCH_VERSION -> HIPCCL_PATCH_VERSION The value is unchanged (3000002) and the documented _LIBCUDACXX_CUDA_API_VERSION alias layer in <cuda/std/detail/__config> keeps working, so code using the documented spelling is unaffected. Untouched on purpose: the _CCCL_VERSION_* macros in __cccl/compiler.h and __cccl/cuda_toolkit.h. Despite the shared spelling they are unrelated preprocessor machinery behind _CCCL_COMPILER(), _CCCL_CUDACC_*() and _CCCL_CTK_*(), not the release number. Also: - Point the libhipcxx-config-version.cmake regex at the new name. It scrapes the header as text, so nothing links it to the header; a stale pattern used to surface as a cryptic "math cannot parse the expression" during a downstream find_package(). Added an explicit FATAL_ERROR when the parse yields nothing. - Guard the version test against the old spellings reappearing. BREAKING CHANGE: CCCL_VERSION and its MAJOR/MINOR/PATCH companions are no longer defined. Because an undefined macro evaluates to 0 inside #if, code written as `#if CCCL_VERSION >= ...` will silently stop matching rather than fail to compile. Consumers should switch to HIPCCL_VERSION or to _LIBCUDACXX_CUDA_API_VERSION. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
obersteiner
marked this pull request as ready for review
August 31, 2026 15:52
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.
The version macros exposed by libhipcxx carried NVIDIA's CCCL branding, which is misleading for consumers of a HIP library: CCCL_VERSION named libhipcxx's own release number, not any NVIDIA component's.
Rename the whole public family so the names match the project:
CCCL_VERSION -> HIPCCL_VERSION
CCCL_MAJOR_VERSION -> HIPCCL_MAJOR_VERSION
CCCL_MINOR_VERSION -> HIPCCL_MINOR_VERSION
CCCL_PATCH_VERSION -> HIPCCL_PATCH_VERSION
The value is unchanged (3000002) and the documented _LIBCUDACXX_CUDA_API_VERSION alias layer in <cuda/std/detail/__config> keeps working, so code using the documented spelling is unaffected.
Untouched on purpose: the CCCL_VERSION* macros in __cccl/compiler.h and __cccl/cuda_toolkit.h. Despite the shared spelling they are unrelated preprocessor machinery behind _CCCL_COMPILER(), CCCL_CUDACC() and CCCL_CTK(), not the release number.
Also:
BREAKING CHANGE: CCCL_VERSION and its MAJOR/MINOR/PATCH companions are no longer defined. Because an undefined macro evaluates to 0 inside #if, code written as
#if CCCL_VERSION >= ...will silently stop matching rather than fail to compile. Consumers should switch to HIPCCL_VERSION or to _LIBCUDACXX_CUDA_API_VERSION.Description
closes
Checklist