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

Experimental feature enablement macros are overkill #4097

Closed
brycelelbach opened this issue Mar 11, 2025 · 2 comments · Fixed by #4102
Closed

Experimental feature enablement macros are overkill #4097

brycelelbach opened this issue Mar 11, 2025 · 2 comments · Fixed by #4102
Assignees

Comments

@brycelelbach
Copy link
Contributor

#define LIBCUDACXX_ENABLE_EXPERIMENTAL_FOO
#include <cuda/experimental/foo.cuh>
namespace cudax = cuda::experimental;

int main() {
   cudax::foo();
}

How many times do I have to say "experimental"?

The macros to enable experimental features are overkill and should be removed. Users already have to include a header in an experimental directory and use a very verbose namespace that shouts at them that this is experimental.

The macro is annoying, especially when prototyping or educating. Best practice is to define macros like these in build systems, not in source code, so we probably don't want to teach users to #define in source code.

If I'm experimenting with a new feature on Godbolt or a notebook environment, I have to either remember or figure out how to add the macro to the build command (which can be more annoying in these online environments) or I have to do the naughty thing.

Experimental headers should not be included by any non-experimental headers, so I can't imagine a situation where a user would ever get experimental code without explicitly requesting it by including the experimental header.

Unless there is a strong technical reason to keep these around, they should be removed.

@brycelelbach
Copy link
Contributor Author

@bernhardmgruber @miscco

@miscco
Copy link
Contributor

miscco commented Mar 11, 2025

That is a remnant from them originally living inside libcu++ which carries the CTKs stability guarantees.

I agree that we should be able to just drop that flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants