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

[FEA]: Define public version macros for libcudacxx #372

Closed
1 of 3 tasks
Tracked by #373
jrhemstad opened this issue Aug 24, 2023 · 1 comment
Closed
1 of 3 tasks
Tracked by #373

[FEA]: Define public version macros for libcudacxx #372

jrhemstad opened this issue Aug 24, 2023 · 1 comment
Labels
feature request New feature or request.

Comments

@jrhemstad
Copy link
Collaborator

jrhemstad commented Aug 24, 2023

Is this a duplicate?

Area

libcu++

Is your feature request related to a problem? Please describe.

As a user of CCCL, I want blessed symbols that I can use to query the version of various libraries.

libcudacxx currently has definitions for these in _LIBCUDACXX_API_VERSION, _LIBCUDACXX_API_VERSION_MAJOR/MINOR/PATCH:

#define _LIBCUDACXX_CUDA_API_VERSION 2002000
#define _LIBCUDACXX_CUDA_API_VERSION_MAJOR \
(_LIBCUDACXX_CUDA_API_VERSION / 1000000)
#define _LIBCUDACXX_CUDA_API_VERSION_MINOR \
(_LIBCUDACXX_CUDA_API_VERSION / 1000 % 1000)
#define _LIBCUDACXX_CUDA_API_VERSION_PATCH \
(_LIBCUDACXX_CUDA_API_VERSION % 1000)

The leading underscore implies that these are internal only symbols and shouldn't be relied on by user code.

Describe the solution you'd like

  • Add the following to cuda/std/detail/__config
#define LIBCUDACXX_VERSION _LIBCUDACXX_API_VERSION
#define LIBCUDACXX_VERSION_MAJOR _LIBCUDACXX_API_VERSION_MAJOR
#define LIBCUDACXX_VERSION_MINOR _LIBCUDACXX_API_VERSION_MINOR
#define LIBCUDACXX_VERSION_PATCH _LIBCUDACXX_API_VERSION_PATCH
  • Add cuda/std/version and cuda/version that just include cuda/std/detail__config.

Describe alternatives you've considered

No response

Additional context

Eventually we'll want to have a centralized CCCL_VERSION/MAJOR/MINOR/PATCH that libcudacxx/cub/thrust all reference, but this is good for now.

@jrhemstad jrhemstad added the feature request New feature or request. label Aug 24, 2023
@jrhemstad
Copy link
Collaborator Author

#652

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request.
Projects
Archived in project
Development

No branches or pull requests

1 participant