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]: Emit diagnostic when users attempt to use CCCL with an invalid version of the CTK #364

Open
1 task done
jrhemstad opened this issue Aug 22, 2023 · 0 comments
Open
1 task done
Labels
feature request New feature or request.

Comments

@jrhemstad
Copy link
Collaborator

jrhemstad commented Aug 22, 2023

Is this a duplicate?

Area

General CCCL

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

As a user of CCCL, I'd like to know if I am violating CCCL's compatibility guarantees by using a version of CCCL with an unsupported version of the CTK.

This can happen in two ways:

  1. Backwards compatibility
    • A CCCL release is backwards compatible with the oldest minor version of the preceeding major version release. e.g., CCCL 2.2 is not compatible with CTK <= 11.1.
  2. Forwards compatibility
    • CCCL is never forwards compatible, so users should get a diagnostic when attempting to compile a CCCL header with a CTK version newer than what it was released with.

Describe the solution you'd like

In a central header, we should have a check something like this:

#if (_LIBCUDACXX_CUDACC > __CCCL_NEWEST_SUPPORTED_CTK) && !defined(CCCL_ALLOW_UNSUPPORTED_CTK)
   #error "Attempting to use CCCL STRINGIFY(__CCCL_VERSION) with too new a version of CUDA STRINGIFY(_LIBCUDACXX_CUDACC). CCCL is not forward compatible and this is unsupported. To silence this warning, upgrade the version of CCCL you are using or define CCCL_ALLOW_UNSUPPORTED_CTK at your own risk."
#endif

#if (_LIBCUDACXX_CUDACC < __CCCL_OLDEST_SUPPORTED_CTK) && !defined(CCCL_ALLOW_UNSUPPORTED_CTK)
   #error "Attempting to use CCCL version STRINGIFY(__CCCL_VERSION) with too old a version of CUDA STRINGIFY(_LIBCUDACXX_CUDACC). To silence this warning, upgrade the version of the CTK you are using or define CCCL_ALLOW_UNSUPPORTED_CTK at your own risk.
#endif

Describe alternatives you've considered

No response

Additional context

Related to new compatibility guarantees as part of #66

@jrhemstad jrhemstad added the feature request New feature or request. label Aug 22, 2023
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
Status: Todo
Development

No branches or pull requests

1 participant