Skip to content

api!: rename the public CCCL_VERSION family to HIPCCL_* - #30

Open
obersteiner wants to merge 1 commit into
amd-developfrom
amd/dev/moberste/rename-cccl-version-to-hipccl
Open

api!: rename the public CCCL_VERSION family to HIPCCL_*#30
obersteiner wants to merge 1 commit into
amd-developfrom
amd/dev/moberste/rename-cccl-version-to-hipccl

Conversation

@obersteiner

Copy link
Copy Markdown
Collaborator

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.

Description

closes

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

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
obersteiner marked this pull request as ready for review August 31, 2026 15:52

@monoatamd monoatamd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants