Skip to content

CUDA 12.1, 12.2, 12.3, 12.4 constexpr issues, FIXED in CUDA 12.5 #1766

Open

Description

@havogt

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:

template <class T>
struct foo {
    T m;
    constexpr foo(T const &a) : m(a) {}
};
int main() {
    auto f = foo([]{});
}

where foo can be std::tuple.

Activity

  1. pinned this issue on Aug 9, 2023
  2. havogt commented on Jan 26, 2024

    @havogt
    ContributorAuthor

    12.3 affected as well #1768

  3. changed the title [-]CUDA 12.1, 12.2 constexpr issues[/-] [+]CUDA 12.1, 12.2, 12.3 constexpr issues[/+] on Jan 26, 2024
  4. havogt commented on Mar 12, 2024

    @havogt
    ContributorAuthor

    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([] {}));
    }
  5. changed the title [-]CUDA 12.1, 12.2, 12.3 constexpr issues[/-] [+]CUDA 12.1, 12.2, 12.3, 12.4 constexpr issues[/+] on Mar 12, 2024
  6. havogt commented on May 30, 2024

    @havogt
    ContributorAuthor

    The issues are fixed in CUDA 12.5.

    Leaving this open for reference.

  7. changed the title [-]CUDA 12.1, 12.2, 12.3, 12.4 constexpr issues[/-] [+]CUDA 12.1, 12.2, 12.3, 12.4 constexpr issues, FIXED in CUDA 12.5[/+] on May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions