-
Notifications
You must be signed in to change notification settings - Fork 22
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
CUDA 12.1, 12.2, 12.3, 12.4 constexpr issues, FIXED in CUDA 12.5 #1766
Labels
Comments
havogt
added a commit
that referenced
this issue
Aug 16, 2023
CUDA 12.1 and 12.2 have a problem with constexpr, e.g. in the context of CTAD, see #1766. The workaround is to do pre-C++17 `make_tuple`-construction or construct from a (possibly moved-from) lvalue. CI: add GCC + CUDA 12.1/12.2 and NVHPC 23.7 Co-authored-by: Péter Kardos <[email protected]>
havogt
added a commit
that referenced
this issue
Aug 16, 2023
CUDA 12.1 and 12.2 have a problem with constexpr, e.g. in the context of CTAD, see #1766. The workaround is to do pre-C++17 `make_tuple`-construction or construct from a (possibly moved-from) lvalue. CI: add GCC + CUDA 12.1/12.2 and NVHPC 23.7 Co-authored-by: Péter Kardos <[email protected]>
12.3 affected as well #1768 |
12.4 fixed the above example, but this small variation still fails template <class T>
struct foo {
T m;
constexpr foo(T const &a) : m(a) {}
};
template <class T>
struct bar {
T m;
constexpr bar(T const &a) : m(a) {}
};
int main() {
auto f = foo(bar([] {}));
} |
The issues are fixed in CUDA 12.5. Leaving this open for reference. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CUDA 12.1 and CUDA 12.2 seem to have (once again) problems with constexpr construction.
E.g. the following was fine in 12.0, but fails to compile now:
where
foo
can bestd::tuple
.The text was updated successfully, but these errors were encountered: