Skip to content

CUDA code compile error with clang: function template partial specialization is not allowed #765

Open

Description

@zhiweij1

Branch/Tag/Commit

main

Docker Image Version

N/A

GPU name

N/A

CUDA Driver

N/A

Reproduced Steps

Smaller reproducer:


template<class T1, class T2>
struct A {
  template <class T3>
  void foo(T3 x);
};

template<typename T1, typename T2>
template<typename T3>
void A<T1, T2>::foo<T3>(T3 x) {

}

https://godbolt.org/z/xn7vre9db

The original code comes from

void CutlassFpAIntBGemmRunner<T, WeightType>::dispatch_to_arch<EpilogueTag>(const T* A,

The syntax of definition of “foo” is incorrect according to https://en.cppreference.com/w/cpp/language/member_template

LLVM community think it is not a bug in clang: llvm/llvm-project#68772

I think FasterTransformer should fix the usage in the source code.

Activity

  1. added
    bug
    on Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions