Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CCCL_VERSION and script for updating version #652

Merged
merged 12 commits into from
Nov 7, 2023

Conversation

jrhemstad
Copy link
Collaborator

@jrhemstad jrhemstad commented Nov 2, 2023

Description

closes #646
closes #645

In attempt to add some consistency and convenience around our versioning, this PR introduces CCCL_VERSION definitions and a script for automating updating versions everywhere that it is needed.

There's an unfortunate complication caused by the fact that Thrust/CUB use MMMmmmpp whereas libcudacxx uses MMMmmmppp. I made the CCCL version use MMMmmmppp. Ideally we'd have been able to define THRUST_VERSION and CUB_VERSION as:

#define CUB_VERSION (CCCL_MAJOR_VERSION * 100000 + CCCL_MINOR_VERSION * 100 + CCCL_PATCH_VERSION)

but this causes terrible macro expansion breakages due to the fact that CUB_VERSION is used with the preprocessor concatenation token, ##, to form the versioned inline namespace. Therefore, the CUB and Thrust versions need to remain as a singular value.

  • Adds <cuda/version> and CCCL_VERSION w/ associated components
  • Updates libcudacxx version macros to just use CCCL_VERSION
  • Adds static_asserts to ensure Thrust/CUB versions agree with CCCL_VERSION
  • Adds update_version script to automate updating versions
  • Replaces cmake logic that parses header files for version information and relies on the update_version script to ensure this gets updated
  • Updates version to 2.3.0

Checklist

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

@jrhemstad jrhemstad requested review from a team as code owners November 2, 2023 18:19
@jrhemstad jrhemstad requested review from alliepiper, ericniebler, jarmak-nv and elstehle and removed request for a team November 2, 2023 18:19
@jrhemstad jrhemstad added the backport branch/2.3.x For backporting to the 2.3.x release branch label Nov 2, 2023
@alliepiper
Copy link
Collaborator

@jrhemstad I forgot about this -- there is one place in CMake that encodes the version: lib/cmake/cccl/cccl-config-version.cmake does store the version since there are no CCCL headers to parse from.

thrust/thrust/version.h Show resolved Hide resolved
thrust/thrust/version.h Show resolved Hide resolved
@miscco miscco merged commit a9d7d8e into NVIDIA:main Nov 7, 2023
517 checks passed
Copy link
Contributor

github-actions bot commented Nov 7, 2023

Successfully created backport PR for branch/2.3.x:

@miscco
Copy link
Collaborator

miscco commented Nov 7, 2023

/backport

Copy link
Contributor

github-actions bot commented Nov 7, 2023

Git push to origin failed for branch/2.3.x with exitcode 1

@jrhemstad jrhemstad removed the backport branch/2.3.x For backporting to the 2.3.x release branch label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
4 participants