<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68772>68772</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
C++ code compile error: function template partial specialization is not allowed
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zhiweij1
</td>
</tr>
</table>
<pre>
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 https://github.com/NVIDIA/FasterTransformer/blob/afdf9a9eb86f15363c0249117d166d6b45dbb371/src/fastertransformer/kernels/cutlass_kernels/fpA_intB_gemm/fpA_intB_gemm_template.h#L426
It can be built with nvcc successfully.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U12PqzgM_TXmJboVcSiUBx76sUgjrfZlq32tkmBK7gaCktDemV-_gnaG2dHoSkjEsc_xMQfLEMx1IKpge4DtKZFT7Jyv3jpzJ_OTJ8o1r9XfvbSWPPM0etdMmjyIPaQnSPeQp89nCSP1o5WRQBy1lSGwMwc8sucZQfzxqAvRTzqyPYPi8Lhh7B3LVrD4ADB2c6ZhrXOAu7NgvwBLEE8sFKf1_FVHfB1pkD09pazhqubb6rX30nkP4vhgeADFHsR-liOOj9IPWetMq7rvvlUX4xhmHqwB66trlLNx4_wVsH4DrH8Nxc1T2ajPZOeOmPPmagZpmXYNMe16Cqz1rmdfGE3sJrXRrges__rn5fQyJ2oZIvmzl0None_JA9bKOgVYy7ZpS1mS2uUt34pc6BSzkvOi4Xne5CrbNkqJggPWwWvAul244v-4_iU_kA2AtZ7i7OJlvWnH_cUM8XC5Ut9_jS_vLmw6QPFnhvnnuV8i03JgipiajI3sbmLHhpvWLExaUwjtZO3rJmkq0ZSilAlVPC-LNC23eZ50VcYVFnnJtZB6V-BO4y4vt6RkzqmgliemwhQFTzlPC4FZttkK5FnZoNS6xCZTkKXUS2M31t762abEhDBRle-KAhMrFdmwbBHiQHe2JAFxXipfzZgfaroGyFJrQgwrSzTRUnUEPAAePiwdjSVG3rt51Vg7DToaN6w7MkofjbQsjKSNtOZNLnkT2OAik9a6OzXJ5G31m59i1vB8_Ri9-0k6AtaL8tmuZbL_AgAA__-AMkYI">